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");
48 if (axmap_isset(map, val)) {
49 printf("bit already set\n");
53 if (!axmap_isset(map, val)) {
54 printf("bit not set\n");
59 ff = axmap_next_free(map, osize);
60 if (ff != (uint64_t) -1ULL) {
61 printf("axmap_next_free broken: got %llu\n", (unsigned long long) ff);