summaryrefslogtreecommitdiff
path: root/include/my_alloc.h
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-06-11 11:20:31 +0300
committermonty@mashka.mysql.fi <>2002-06-11 11:20:31 +0300
commit2aecdd1a91bf8386829146609ce0219c51793841 (patch)
tree8fcaabe013fff43cf466235067f2c47f0cd66531 /include/my_alloc.h
parentdb41437a100e204e60f45d5c9a6b26f63e512659 (diff)
downloadmariadb-git-2aecdd1a91bf8386829146609ce0219c51793841.tar.gz
Big code cleanup/review before 4.0.2 release.
(All commit emails since 4.0.1 checked) This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
Diffstat (limited to 'include/my_alloc.h')
-rw-r--r--include/my_alloc.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/my_alloc.h b/include/my_alloc.h
index 0857c8886c5..60d0d4f4b6d 100644
--- a/include/my_alloc.h
+++ b/include/my_alloc.h
@@ -18,18 +18,23 @@
Data structures for mysys/my_alloc.c (root memory allocator)
*/
-#ifndef ST_USED_MEM_DEFINED
-#define ST_USED_MEM_DEFINED
-typedef struct st_used_mem { /* struct for once_alloc (block) */
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
struct st_used_mem *next; /* Next block in use */
unsigned int left; /* memory left in block */
unsigned int size; /* size of block */
} USED_MEM;
-typedef struct st_mem_root {
+
+
+typedef struct st_mem_root
+{
USED_MEM *free; /* blocks with free memory in it */
USED_MEM *used; /* blocks almost without free memory */
USED_MEM *pre_alloc; /* preallocated block */
- /* if block have less memory it will be put in 'used' list*/
+ /* if block have less memory it will be put in 'used' list */
unsigned int min_malloc;
unsigned int block_size; /* initial block size */
unsigned int block_num; /* allocated blocks counter */