-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.c
43 lines (37 loc) · 949 Bytes
/
test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#define SYS_PAGE_SIZE 4096
#include "Utils/SQTree/NMap.h"
#include "Utils/String/String.h"
#include <string.h>
void main()
{
srand(time(NULL));
void *map = nmap_openStorage("fgjh ");
void *t = nmap_alloc(map, 128ULL);
printf("t 1: %llu\n", t);
nmap_free(map, t);
t = nmap_alloc(map, 128ULL);
printf("t 2: %llu\n", t);
nmap_free(map, t);
t = nmap_alloc(map, 128ULL);
printf("t 3: %llu\n", t);
nmap_free(map, t);
t = nmap_alloc(map, 128ULL);
printf("t 4: %llu\n", t);
nmap_free(map, t);
t = nmap_alloc(map, 556ULL);
printf("t 5: %llu\n", t);
nmap_free(map, t);
t = nmap_alloc(map, 128ULL);
printf("t 6: %llu\n", t);
printf("%s\n", nmap_getDbName(map));
nmap_closeStorage(map);
}