test/mpool_tests.c

changeset 14
b78e174b6814
parent 13
98ac89e3aa37
child 19
cdd7a3173249
--- a/test/mpool_tests.c	Sat Dec 31 21:05:59 2011 +0100
+++ b/test/mpool_tests.c	Sat Dec 31 22:21:45 2011 +0100
@@ -31,12 +31,12 @@
     printf("   Test ucx_mempool_malloc\n");
     int *ptr1 = (int*)ucx_mempool_malloc(pool, sizeof(int));
     for(int i=0;i<256;i++) {
-        ucx_mempool_malloc(pool, i);
+        ucx_mempool_malloc(pool, i+1);
     }
     int *ptr2 = (int*)ucx_mempool_malloc(pool, sizeof(int));
     int *ptr3 = (int*)ucx_mempool_malloc(pool, sizeof(int));
     for(int i=0;i<256;i++) {
-        ucx_mempool_malloc(pool, i);
+        ucx_mempool_malloc(pool, i+1);
     }
     int *ptr4 = (int*)ucx_mempool_malloc(pool, sizeof(int));
 
@@ -66,13 +66,13 @@
     if(strcmp(str, "OK!") != 0) {
         fprintf(stderr, "Test ucx_mempool_realloc failed!\n");
     }
-
+    
     printf("   Test ucx_mempool_reg_destr\n");
     char *hello = "Hello World!";
     ucx_mempool_reg_destr(pool, hello, (ucx_destructor)hello_destructor);
 
     printf("   Test ucx_mempool_free\n");
-    ucx_mempool_free(pool);
+    //ucx_mempool_free(pool);
     
 
     return 0;

mercurial