/* $Id$ * */ /* * $Log: /pjproject-0.3/pjlib/src/pjlib-test/pool_perf.c $ * * 2 10/14/05 12:26a Bennylp * Finished error code framework, some fixes in ioqueue, etc. Pretty * major. * * 1 10/05/05 5:13p Bennylp * Created. * */ #include "test.h" #if INCLUDE_POOL_PERF_TEST #include #include #if !PJ_HAS_HIGH_RES_TIMER # error Need high resolution timer for this test. #endif #define THIS_FILE "test" #define LOOP 10 #define COUNT 1024 static unsigned sizes[COUNT]; #define MIN_SIZE 4 #define MAX_SIZE 512 static unsigned total_size; static int pool_test_pool() { int i; pj_pool_t *pool = pj_pool_create(mem, NULL, total_size + 4*COUNT, 0, NULL); if (!pool) return -1; for (i=0; i