Commit a805ee5f authored by marko's avatar marko

branches/zip: When innodb_use_sys_malloc is set, ignore

innodb_additional_mem_pool_size, because nothing will
be allocated from mem_comm_pool.

mem_pool_create(): Remove the assertion about size.  The function will
work with any size.  However, an assertion would fail in ut_malloc_low()
when size==0.

mem_init(): When srv_use_sys_malloc is set, pass size=1 to mem_pool_create().

mem0mem.c: Add #include "srv0srv.h" that is needed by mem0dbg.c.
parent ecda78f0
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
* handler/ha_innodb.h, handler/ha_innodb.cc: * handler/ha_innodb.h, handler/ha_innodb.cc:
Fix Bug#41676 Table names are case insensitive in locking Fix Bug#41676 Table names are case insensitive in locking
2009-02-10 The InnoDB Team
* mem/mem0pool.c, mem/mem0dbg.c, mem/mem0mem.c:
When innodb_use_sys_malloc is set, ignore
innodb_additional_mem_pool_size, because nothing will
be allocated from mem_comm_pool.
2009-02-10 The InnoDB Team 2009-02-10 The InnoDB Team
* ut/ut0mem.c: * ut/ut0mem.c:
......
...@@ -138,6 +138,14 @@ mem_init( ...@@ -138,6 +138,14 @@ mem_init(
mem_hash_initialized = TRUE; mem_hash_initialized = TRUE;
#endif #endif
if (srv_use_sys_malloc) {
/* When innodb_use_sys_malloc is set, the
mem_comm_pool won't be used for any allocations. We
create a dummy mem_comm_pool, because some statistics
and debugging code relies on it being initialized. */
size = 1;
}
mem_comm_pool = mem_pool_create(size); mem_comm_pool = mem_pool_create(size);
} }
......
...@@ -14,6 +14,7 @@ Created 6/9/1994 Heikki Tuuri ...@@ -14,6 +14,7 @@ Created 6/9/1994 Heikki Tuuri
#include "mach0data.h" #include "mach0data.h"
#include "buf0buf.h" #include "buf0buf.h"
#include "srv0srv.h"
#include "mem0dbg.c" #include "mem0dbg.c"
#include <stdarg.h> #include <stdarg.h>
......
...@@ -193,8 +193,6 @@ mem_pool_create( ...@@ -193,8 +193,6 @@ mem_pool_create(
ulint i; ulint i;
ulint used; ulint used;
ut_a(size > 10000);
pool = ut_malloc(sizeof(mem_pool_t)); pool = ut_malloc(sizeof(mem_pool_t));
/* We do not set the memory to zero (FALSE) in the pool, /* We do not set the memory to zero (FALSE) in the pool,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment