X-Git-Url: https://code.grnet.gr/git/archipelago/blobdiff_plain/1ff0ea62321a6d779ae470900d96e95be02246bc..ff044a7c93cd5a8009a3367f24c5152c1f3dca83:/xseg/xtypes/xobj.c diff --git a/xseg/xtypes/xobj.c b/xseg/xtypes/xobj.c index 5154e11..6d96229 100644 --- a/xseg/xtypes/xobj.c +++ b/xseg/xtypes/xobj.c @@ -43,6 +43,8 @@ int xobj_alloc_obj(struct xobject_h * obj_h, uint64_t nr) struct xheap *heap = XPTR_TAKE(obj_h->heap, container); struct xobject *obj = NULL; + unsigned long i = 0; + uint64_t used, bytes = nr * obj_h->obj_size; xptr objptr; xhash_t *allocated = XPTR_TAKE(obj_h->allocated, container); @@ -66,6 +68,8 @@ int xobj_alloc_obj(struct xobject_h * obj_h, uint64_t nr) obj->size = obj_h->obj_size; obj->next = XPTR_MAKE(((unsigned long) mem) + used, container); //point to the next obj // printf("foo: %lx\n", &obj->next); + + i++; retry: r = xhash_insert(allocated, objptr, objptr); //keep track of allocated objects @@ -91,6 +95,7 @@ retry: goto retry; } } + XSEGLOG("allocated %lu elements\n", i); if (!obj) return -1; objptr = obj_h->list;