aboutsummaryrefslogtreecommitdiffstats
path: root/testalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'testalloc.c')
-rw-r--r--testalloc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/testalloc.c b/testalloc.c
index 9c66d07..9a6d3ed 100644
--- a/testalloc.c
+++ b/testalloc.c
@@ -50,11 +50,10 @@ void verify_no_overlap(int slot)
int main(int argc, char *argv[])
{
- void *buf;
int i, slot, newsize;
double rnd;
+ void **root_ptr;
void *nptr;
- size_t arena_len = 4096;
unsigned long occupied = 0;
unlink("arena.dat");
@@ -63,12 +62,14 @@ int main(int argc, char *argv[])
memset(areas, 0, sizeof(areas));
memset(sizes, 0, sizeof(sizes));
- buf = objstore_init("arena.dat", "arena.log", &arena_len);
- if ( !objstore_arena_init() ) {
+ if ( !(root_ptr = objstore_arena_init("arena.dat", "arena.log")) ) {
fprintf(stderr, "%s: objstore_arena_init() failed\n", argv[0]);
return 1;
}
+ printf("Arena: initialized, %d root pointers at %p\n",
+ ROOT_DATA_POINTERS, root_ptr);
+
objstore_checkpoint(0.0);
for ( i = 0 ; i < COUNT ; i++ ) {