test/mpool_tests.c

changeset 241
661f33ef20d8
parent 225
a1a068c2c4ef
child 250
b7d1317b138e
equal deleted inserted replaced
240:8f937a3a6d11 241:661f33ef20d8
65 UCX_TEST_BEGIN 65 UCX_TEST_BEGIN
66 ucx_mempool_malloc(pool, sizeof(int)); 66 ucx_mempool_malloc(pool, sizeof(int));
67 intptr_t *test = (intptr_t*) ucx_mempool_malloc(pool, sizeof(intptr_t)); 67 intptr_t *test = (intptr_t*) ucx_mempool_malloc(pool, sizeof(intptr_t));
68 68
69 UCX_TEST_ASSERT(pool->ndata == 2, "counter not incremented"); 69 UCX_TEST_ASSERT(pool->ndata == 2, "counter not incremented");
70 UCX_TEST_ASSERT(pool->size == 17, "chcap not called"); 70 UCX_TEST_ASSERT(pool->size == 2, "chcap not called");
71 71
72 intptr_t *pooladdr = 72 intptr_t *pooladdr =
73 (intptr_t*)((char*)pool->data[1] + sizeof(ucx_destructor)); 73 (intptr_t*)((char*)pool->data[1] + sizeof(ucx_destructor));
74 *pooladdr = 5; 74 *pooladdr = 5;
75 75

mercurial