aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gmalloc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 103c19156be..baaff58050f 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -144,8 +144,7 @@ typedef union
144 size_t first; /* First free fragment of the block. */ 144 size_t first; /* First free fragment of the block. */
145 } frag; 145 } frag;
146 /* For a large object, in its first block, this has the number 146 /* For a large object, in its first block, this has the number
147 of blocks in the object. In the other blocks, this has a 147 of blocks in the object. */
148 negative number which says how far back the first block is. */
149 ptrdiff_t size; 148 ptrdiff_t size;
150 } info; 149 } info;
151 } busy; 150 } busy;
@@ -493,9 +492,6 @@ register_heapinfo (void)
493 /* Describe the heapinfo block itself in the heapinfo. */ 492 /* Describe the heapinfo block itself in the heapinfo. */
494 _heapinfo[block].busy.type = -1; 493 _heapinfo[block].busy.type = -1;
495 _heapinfo[block].busy.info.size = blocks; 494 _heapinfo[block].busy.info.size = blocks;
496 /* Leave back-pointers for malloc_find_address. */
497 while (--blocks > 0)
498 _heapinfo[block + blocks].busy.info.size = -blocks;
499} 495}
500 496
501#ifdef USE_PTHREAD 497#ifdef USE_PTHREAD
@@ -887,12 +883,6 @@ _malloc_internal_nolock (size_t size)
887 ++_chunks_used; 883 ++_chunks_used;
888 _bytes_used += blocks * BLOCKSIZE; 884 _bytes_used += blocks * BLOCKSIZE;
889 _bytes_free -= blocks * BLOCKSIZE; 885 _bytes_free -= blocks * BLOCKSIZE;
890
891 /* Mark all the blocks of the object just allocated except for the
892 first with a negative number so you can find the first block by
893 adding that adjustment. */
894 while (--blocks > 0)
895 _heapinfo[block + blocks].busy.info.size = -blocks;
896 } 886 }
897 887
898 PROTECT_MALLOC_STATE (1); 888 PROTECT_MALLOC_STATE (1);