diff options
author | unknown <monty@donna.mysql.com> | 2001-02-17 14:19:19 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-02-17 14:19:19 +0200 |
commit | 132e667b0bbbe33137b6baeb59f3f22b7524f066 (patch) | |
tree | bfe39951a73e906579ab819bf5198ad8f3a64a36 /innobase/include/mem0pool.h | |
parent | b084cf1951eb271f662a9326c950f4cf0570258d (diff) | |
download | mariadb-git-132e667b0bbbe33137b6baeb59f3f22b7524f066.tar.gz |
Added Innobase to source distribution
Docs/manual.texi:
Added Innobase documentation
configure.in:
Incremented version
include/my_base.h:
Added option for Innobase
myisam/mi_check.c:
cleanup
mysql-test/t/bdb.test:
cleanup
mysql-test/t/innobase.test:
Extended with new tests from bdb.test
mysql-test/t/merge.test:
Added test of SHOW create
mysys/my_init.c:
Fix for UNIXWARE 7
scripts/mysql_install_db.sh:
Always write how to start mysqld
scripts/safe_mysqld.sh:
Fixed type
sql/ha_innobase.cc:
Update to new version
sql/ha_innobase.h:
Update to new version
sql/handler.h:
Added 'update_table_comment()' and 'append_create_info()'
sql/sql_delete.cc:
Fixes for Innobase
sql/sql_select.cc:
Fixes for Innobase
sql/sql_show.cc:
Append create information (for MERGE tables)
sql/sql_update.cc:
Fixes for Innobase
Diffstat (limited to 'innobase/include/mem0pool.h')
-rw-r--r-- | innobase/include/mem0pool.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/innobase/include/mem0pool.h b/innobase/include/mem0pool.h new file mode 100644 index 00000000000..b6906894c53 --- /dev/null +++ b/innobase/include/mem0pool.h @@ -0,0 +1,83 @@ +/****************************************************** +The lowest-level memory management + +(c) 1994, 1995 Innobase Oy + +Created 6/9/1994 Heikki Tuuri +*******************************************************/ + +#ifndef mem0pool_h +#define mem0pool_h + +#include "univ.i" +#include "os0file.h" + +typedef struct mem_area_struct mem_area_t; +typedef struct mem_pool_struct mem_pool_t; + +/* The common memory pool */ +extern mem_pool_t* mem_comm_pool; + +/* Each memory area takes this many extra bytes for control information */ +#define MEM_AREA_EXTRA_SIZE UNIV_MEM_ALIGNMENT + +/************************************************************************ +Creates a memory pool. */ + +mem_pool_t* +mem_pool_create( +/*============*/ + /* out: memory pool */ + ulint size); /* in: pool size in bytes */ +/************************************************************************ +Allocates memory from a pool. NOTE: This low-level function should only be +used in mem0mem.*! */ + +void* +mem_area_alloc( +/*===========*/ + /* out, own: allocated memory buffer */ + ulint size, /* in: allocated size in bytes; for optimum + space usage, the size should be a power of 2 + minus MEM_AREA_EXTRA_SIZE */ + mem_pool_t* pool); /* in: memory pool */ +/************************************************************************ +Frees memory to a pool. */ + +void +mem_area_free( +/*==========*/ + void* ptr, /* in, own: pointer to allocated memory + buffer */ + mem_pool_t* pool); /* in: memory pool */ +/************************************************************************ +Returns the amount of reserved memory. */ + +ulint +mem_pool_get_reserved( +/*==================*/ + /* out: reserved mmeory in bytes */ + mem_pool_t* pool); /* in: memory pool */ +/************************************************************************ +Validates a memory pool. */ + +ibool +mem_pool_validate( +/*==============*/ + /* out: TRUE if ok */ + mem_pool_t* pool); /* in: memory pool */ +/************************************************************************ +Prints info of a memory pool. */ + +void +mem_pool_print_info( +/*================*/ + FILE* outfile,/* in: output file to write to */ + mem_pool_t* pool); /* in: memory pool */ + + +#ifndef UNIV_NONINL +#include "mem0pool.ic" +#endif + +#endif |