From 0e7719893889b970dde8c5bb8142dd2cadd42125 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Wed, 23 Apr 2008 14:35:24 +0000 Subject: Fixed chunk size alignment in pool drain test git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1940 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pjlib-test/pool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pjlib/src') diff --git a/pjlib/src/pjlib-test/pool.c b/pjlib/src/pjlib-test/pool.c index a985075d..64be5e31 100644 --- a/pjlib/src/pjlib-test/pool.c +++ b/pjlib/src/pjlib-test/pool.c @@ -105,7 +105,8 @@ static int drain_test(pj_size_t size, pj_size_t increment) int size; if (freesize > 255) - size = ((pj_rand() & 0x000000FF) + 4) & ~0x03L; + size = ((pj_rand() & 0x000000FF) + PJ_POOL_ALIGNMENT) & + ~(PJ_POOL_ALIGNMENT - 1); else size = freesize; -- cgit v1.2.3