summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-04-13 20:08:00 +0300
committerunknown <bell@sanja.is.com.ua>2002-04-13 20:08:00 +0300
commitb54d2759d944a60a485ad1858fc8f86a8100e38b (patch)
tree5c1afe1ae4551a2f09520031f6c1fde52bac8505 /include
parent54373c16f8435db653ffbad55466e457eb816976 (diff)
parent9888834dd4d3c0f01f26556ecd10f22fb27b2495 (diff)
downloadmariadb-git-b54d2759d944a60a485ad1858fc8f86a8100e38b.tar.gz
collision resolving
Diffstat (limited to 'include')
-rw-r--r--include/my_alloc.h39
-rw-r--r--include/my_sys.h21
-rw-r--r--include/mysql.h18
3 files changed, 41 insertions, 37 deletions
diff --git a/include/my_alloc.h b/include/my_alloc.h
new file mode 100644
index 00000000000..0857c8886c5
--- /dev/null
+++ b/include/my_alloc.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ 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) */
+ 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 {
+ 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*/
+ unsigned int min_malloc;
+ unsigned int block_size; /* initial block size */
+ unsigned int block_num; /* allocated blocks counter */
+
+ void (*error_handler)(void);
+} MEM_ROOT;
+#endif
diff --git a/include/my_sys.h b/include/my_sys.h
index 5867368198f..c4ab76a2ee0 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -464,26 +464,7 @@ typedef struct st_changeable_var {
} CHANGEABLE_VAR;
-/* structs for alloc_root */
-
-#ifndef ST_USED_MEM_DEFINED
-#define ST_USED_MEM_DEFINED
-typedef struct st_used_mem { /* struct for once_alloc */
- 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 {
- USED_MEM *free;
- USED_MEM *used;
- USED_MEM *pre_alloc;
- unsigned int min_malloc;
- unsigned int block_size;
-
- void (*error_handler)(void);
-} MEM_ROOT;
-#endif
+#include "my_alloc.h"
/* Prototypes for mysys and my_func functions */
diff --git a/include/mysql.h b/include/mysql.h
index 7a16cbbe1d2..90deb791dd0 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -100,23 +100,7 @@ typedef struct st_mysql_rows {
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
-#ifndef ST_USED_MEM_DEFINED
-#define ST_USED_MEM_DEFINED
-typedef struct st_used_mem { /* struct for once_alloc */
- 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 {
- USED_MEM *free;
- USED_MEM *used;
- USED_MEM *pre_alloc;
- unsigned int min_malloc;
- unsigned int block_size;
-
- void (*error_handler)(void);
-} MEM_ROOT;
-#endif
+#include "my_alloc.h"
typedef struct st_mysql_data {
my_ulonglong rows;