summaryrefslogtreecommitdiff
path: root/heap/heapdef.h
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-10-13 23:42:37 +0300
committerunknown <monty@hundin.mysql.fi>2002-10-13 23:42:37 +0300
commit61632073ac9473e00d5e0c88078880d3af575828 (patch)
tree3cc59185e6ff0b8119c4cf1fa01af1f80c80c7c5 /heap/heapdef.h
parent8926c0bc3817150d00a1906e07a6e6b469c4c696 (diff)
downloadmariadb-git-61632073ac9473e00d5e0c88078880d3af575828.tar.gz
Allocate HEAP blocks in smaller blocks to get better memory utilization and more speed when used with safemalloc.
Don't initalize memory areas when run with --skip-safemalloc. Docs/manual.texi: ChangeLog heap/heapdef.h: Allocate HEAP blocks in smaller blocks to get better memory utilization and more speed when used with safemalloc. heap/hp_open.c: Allocate HEAP blocks in smaller blocks to get better memory utilization and more speed when used with safemalloc. mysys/safemalloc.c: Don't initalize memory areas when run with --skip-safemalloc. This can in some cases increase speed with 20 times when debugging
Diffstat (limited to 'heap/heapdef.h')
-rw-r--r--heap/heapdef.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/heap/heapdef.h b/heap/heapdef.h
index 938cb55c0eb..6b85e234c5e 100644
--- a/heap/heapdef.h
+++ b/heap/heapdef.h
@@ -22,6 +22,17 @@
#endif
#include "heap.h" /* Structs & some defines */
+/*
+ When allocating keys /rows in the internal block structure, do it
+ within the following boundaries.
+
+ The challenge is to find the balance between allocate as few blocks
+ as possible and keep memory consumption down.
+*/
+
+#define HP_MIN_RECORDS_IN_BLOCK 16
+#define HP_MAX_RECORDS_IN_BLOCK 8192
+
/* Some extern variables */
extern LIST *heap_open_list,*heap_share_list;