diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-20 08:16:49 -0700 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-20 08:16:49 -0700 |
commit | ad837700b86153be3587672124ee663c964f0f15 (patch) | |
tree | 7ec6e8fbe539a169d501a3d1767644b68fab2dab /test/rspamd_mem_pool_test.c | |
parent | baeb17562f47dc31610c0f65079c45a7e6ad44bb (diff) | |
download | rspamd-ad837700b86153be3587672124ee663c964f0f15.tar.gz rspamd-ad837700b86153be3587672124ee663c964f0f15.zip |
Refactor memory pool naming.
Diffstat (limited to 'test/rspamd_mem_pool_test.c')
-rw-r--r-- | test/rspamd_mem_pool_test.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/rspamd_mem_pool_test.c b/test/rspamd_mem_pool_test.c index 51a32c47f..228644799 100644 --- a/test/rspamd_mem_pool_test.c +++ b/test/rspamd_mem_pool_test.c @@ -10,16 +10,16 @@ void rspamd_mem_pool_test_func () { - memory_pool_t *pool; - memory_pool_stat_t st; + rspamd_mempool_t *pool; + rspamd_mempool_stat_t st; char *tmp, *tmp2, *tmp3; pid_t pid; int ret; - pool = memory_pool_new (sizeof (TEST_BUF)); - tmp = memory_pool_alloc (pool, sizeof (TEST_BUF)); - tmp2 = memory_pool_alloc (pool, sizeof (TEST_BUF) * 2); - tmp3 = memory_pool_alloc_shared (pool, sizeof (TEST_BUF)); + pool = rspamd_mempool_new (sizeof (TEST_BUF)); + tmp = rspamd_mempool_alloc (pool, sizeof (TEST_BUF)); + tmp2 = rspamd_mempool_alloc (pool, sizeof (TEST_BUF) * 2); + tmp3 = rspamd_mempool_alloc_shared (pool, sizeof (TEST_BUF)); snprintf (tmp, sizeof (TEST_BUF), "%s", TEST_BUF); snprintf (tmp2, sizeof (TEST_BUF) * 2, "%s", TEST2_BUF); @@ -28,22 +28,22 @@ rspamd_mem_pool_test_func () g_assert (strncmp (tmp, TEST_BUF, sizeof (TEST_BUF)) == 0); g_assert (strncmp (tmp2, TEST2_BUF, sizeof (TEST2_BUF)) == 0); g_assert (strncmp (tmp3, TEST_BUF, sizeof (TEST_BUF)) == 0); - memory_pool_lock_shared (pool, tmp3); + rspamd_mempool_lock_shared (pool, tmp3); if ((pid = fork ()) == 0) { - memory_pool_lock_shared (pool, tmp3); + rspamd_mempool_lock_shared (pool, tmp3); g_assert (*tmp3 == 's'); *tmp3 = 't'; - memory_pool_unlock_shared (pool, tmp3); + rspamd_mempool_unlock_shared (pool, tmp3); exit (EXIT_SUCCESS); } else { *tmp3 = 's'; - memory_pool_unlock_shared (pool, tmp3); + rspamd_mempool_unlock_shared (pool, tmp3); } wait (&ret); g_assert (*tmp3 == 't'); - memory_pool_delete (pool); - memory_pool_stat (&st); + rspamd_mempool_delete (pool); + rspamd_mempool_stat (&st); } |