summaryrefslogtreecommitdiff
path: root/storage/innobase/mem
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2008-10-15 20:54:18 +0200
committerMikael Ronstrom <mikael@mysql.com>2008-10-15 20:54:18 +0200
commit1732095b7dc4026a0bb25d6b612d15c3f3ff28b7 (patch)
tree0e544d3d36c291cd92de5c60cecaeaba75e39f4c /storage/innobase/mem
parent9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff)
downloadmariadb-git-1732095b7dc4026a0bb25d6b612d15c3f3ff28b7.tar.gz
Google SMP patch
Diffstat (limited to 'storage/innobase/mem')
-rw-r--r--storage/innobase/mem/mem0pool.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/storage/innobase/mem/mem0pool.c b/storage/innobase/mem/mem0pool.c
index 27da86a0309..d3b31747690 100644
--- a/storage/innobase/mem/mem0pool.c
+++ b/storage/innobase/mem/mem0pool.c
@@ -329,6 +329,9 @@ mem_area_alloc(
minus MEM_AREA_EXTRA_SIZE */
mem_pool_t* pool) /* in: memory pool */
{
+#ifdef UNIV_DISABLE_MEM_POOL
+ return malloc(size);
+#else /* UNIV_DISABLE_MEM_POOL */
mem_area_t* area;
ulint n;
ibool ret;
@@ -407,6 +410,7 @@ mem_area_alloc(
ut_2_exp(n) - MEM_AREA_EXTRA_SIZE);
return((void*)(MEM_AREA_EXTRA_SIZE + ((byte*)area)));
+#endif /* UNIV_DISABLE_MEM_POOL */
}
/************************************************************************
@@ -459,6 +463,9 @@ mem_area_free(
buffer */
mem_pool_t* pool) /* in: memory pool */
{
+#ifdef UNIV_DISABLE_MEM_POOL
+ free(ptr);
+#else /* UNIV_DISABLE_MEM_POOL */
mem_area_t* area;
mem_area_t* buddy;
void* new_ptr;
@@ -570,6 +577,7 @@ mem_area_free(
mutex_exit(&(pool->mutex));
ut_ad(mem_pool_validate(pool));
+#endif /* UNIV_DISABLE_MEM_POOL */
}
/************************************************************************