8 #include "../lib/lfsr.h"
9 #include "../lib/axmap.h"
11 void *smalloc(size_t size)
21 int main(int argc, char *argv[])
24 size_t osize, size = (1UL << 28) - 200;
30 size = strtoul(argv[1], NULL, 10);
32 seed = strtoul(argv[2], NULL, 10);
35 printf("Using %llu entries\n", (unsigned long long) size);
37 lfsr_init(&lfsr, size, seed);
38 map = axmap_new(size);
44 if (lfsr_next(&lfsr, &val, osize)) {
45 printf("lfsr: short loop\n");
51 ff = axmap_next_free(map, osize);
52 if (ff != (uint64_t) -1ULL) {
53 printf("axmap_next_free broken: got %llu\n", (unsigned long long) ff);