aboutsummaryrefslogtreecommitdiffstats
path: root/src/gmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmalloc.c')
-rw-r--r--src/gmalloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 483d05c5c61..33d424fe9af 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -118,14 +118,13 @@ extern int posix_memalign (void **, size_t, size_t);
118 receive a fragment of a block. Fragment sizes are powers of two, 118 receive a fragment of a block. Fragment sizes are powers of two,
119 and all fragments of a block are the same size. When all the 119 and all fragments of a block are the same size. When all the
120 fragments in a block have been freed, the block itself is freed. */ 120 fragments in a block have been freed, the block itself is freed. */
121#define INT_BIT (CHAR_BIT * sizeof (int)) 121#define BLOCKLOG (INT_WIDTH > 16 ? 12 : 9)
122#define BLOCKLOG (INT_BIT > 16 ? 12 : 9)
123#define BLOCKSIZE (1 << BLOCKLOG) 122#define BLOCKSIZE (1 << BLOCKLOG)
124#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) 123#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)
125 124
126/* Determine the amount of memory spanned by the initial heap table 125/* Determine the amount of memory spanned by the initial heap table
127 (not an absolute limit). */ 126 (not an absolute limit). */
128#define HEAP (INT_BIT > 16 ? 4194304 : 65536) 127#define HEAP (INT_WIDTH > 16 ? 4194304 : 65536)
129 128
130/* Number of contiguous free blocks allowed to build up at the end of 129/* Number of contiguous free blocks allowed to build up at the end of
131 memory before they will be returned to the system. */ 130 memory before they will be returned to the system. */