Mercurial > hg > xemacs-beta
diff src/alloc.c @ 4735:80d74fed5399
Remove "old" GNU malloc in src/malloc.c, and all references to it. Drop the
GNU_MALLOC define, which was only used to distinguish between "old" and "new"
GNU malloc. See xemacs-patches message with ID
<870180fe0911061348g168f85e2m5153e2b554b94803@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Mon, 09 Nov 2009 09:21:59 -0700 |
parents | 80cd90837ac5 |
children | 73e8632018ad |
line wrap: on
line diff
--- a/src/alloc.c Mon Nov 09 17:05:19 2009 +0100 +++ b/src/alloc.c Mon Nov 09 09:21:59 2009 -0700 @@ -4760,7 +4760,7 @@ { Bytecount orig_claimed_size = claimed_size; -#ifdef GNU_MALLOC +#ifndef SYSTEM_MALLOC if (claimed_size < (Bytecount) (2 * sizeof (void *))) claimed_size = 2 * sizeof (void *); # ifdef SUNOS_LOCALTIME_BUG @@ -4797,39 +4797,13 @@ claimed_size += (claimed_size / 4096) * 3 * sizeof (size_t); } -#elif defined (SYSTEM_MALLOC) +#else if (claimed_size < 16) claimed_size = 16; claimed_size += 2 * sizeof (void *); -#else /* old GNU allocator */ - -# ifdef rcheck /* #### may not be defined here */ - claimed_size += 20; -# else - claimed_size += 8; -# endif - { - /* fxg: rename log->log2 to supress gcc3 shadow warning */ - int log2 = 1; - - /* compute the log base two, more or less, then use it to compute - the block size needed. */ - claimed_size--; - /* It's big, it's heavy, it's wood! */ - while ((claimed_size /= 2) != 0) - ++log2; - claimed_size = 1; - /* It's better than bad, it's good! */ - while (log2 > 0) - { - claimed_size *= 2; - log2--; - } - } - -#endif /* old GNU allocator */ +#endif /* system allocator */ if (stats) {