From: Paul Eggert Date: Wed, 21 Jun 2017 18:49:48 +0000 (-0700) Subject: Remove malloc_find_address relic X-Git-Tag: emacs-26.0.90~521^2~22 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b7dfd39c8b2ebd127e83d84b9df48be173bc0134;p=emacs.git Remove malloc_find_address relic * src/gmalloc.c (register_heapinfo, _malloc_internal_nolock): Omit unnecessary initialization. --- 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 size_t first; /* First free fragment of the block. */ } frag; /* For a large object, in its first block, this has the number - of blocks in the object. In the other blocks, this has a - negative number which says how far back the first block is. */ + of blocks in the object. */ ptrdiff_t size; } info; } busy; @@ -493,9 +492,6 @@ register_heapinfo (void) /* Describe the heapinfo block itself in the heapinfo. */ _heapinfo[block].busy.type = -1; _heapinfo[block].busy.info.size = blocks; - /* Leave back-pointers for malloc_find_address. */ - while (--blocks > 0) - _heapinfo[block + blocks].busy.info.size = -blocks; } #ifdef USE_PTHREAD @@ -887,12 +883,6 @@ _malloc_internal_nolock (size_t size) ++_chunks_used; _bytes_used += blocks * BLOCKSIZE; _bytes_free -= blocks * BLOCKSIZE; - - /* Mark all the blocks of the object just allocated except for the - first with a negative number so you can find the first block by - adding that adjustment. */ - while (--blocks > 0) - _heapinfo[block + blocks].busy.info.size = -blocks; } PROTECT_MALLOC_STATE (1);