Lines Matching refs:top
56 Release all but pad bytes of freed top-most memory back
603 int keepcost; /* top-most, releasable (via malloc_trim) space */
628 M_TRIM_THRESHOLD is the maximum amount of unused top-most memory
685 * When sbrk is called to extend the top of the arena to satisfy
1216 1. The special chunk `top', which doesn't bother using the
1219 initialization, `top' is forced to always exist. If it would
1251 * `top': The top-most available chunk (i.e., the one bordering the
1258 most recently split (non-top) chunk. This bin is checked
1423 The special chunks `top' and `last_remainder' get their own bins,
1425 although `top' is never properly linked to its bin since it is
1446 #define top (bin_at(0)->fd) /* The topmost chunk */
1451 Because top initially points to its own bin with initial
1606 if (p != top)
1607 assert((char*)p + sz <= (char*)top);
1637 assert (next == top || inuse(next));
1669 if (next == top)
1923 Extend the top-most chunk by obtaining memory from system.
1937 INTERNAL_SIZE_T top_size; /* new size of top chunk */
1939 mchunkptr old_top = top; /* Record state of old top */
1964 if (brk == old_end) /* can just add bytes to current top */
1967 set_head(top, top_size | PREV_INUSE);
1997 top = (mchunkptr)brk;
1999 set_head(top, top_size | PREV_INUSE);
2010 set_head(top, PREV_INUSE); /* will force null return from malloc */
2033 assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0);
2072 (`top') is split off. (This use of `top' is in accord with
2073 the best-fit search rule. In effect, `top' is treated as
2083 6. Otherwise, the top of memory is extended by
2309 /* Try to use top chunk */
2311 /* Require that there be a remainder, ensuring top always exists */
2312 if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
2324 if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
2328 victim = top;
2330 top = chunk_at_offset(victim, nb);
2331 set_head(top, remainder_size | PREV_INUSE);
2351 it is consolidated into the top, and if the total unused
2399 if (next == top) /* merge with top */
2412 top = p;
2562 if (next == top || !inuse(next))
2566 /* Forward into top only if a remainder */
2567 if (next == top)
2572 top = chunk_at_offset(oldp, nb);
2573 set_head(top, (newsize - nb) | PREV_INUSE);
2604 /* into top */
2605 if (next == top)
2614 top = chunk_at_offset(newp, nb);
2615 set_head(top, (newsize - nb) | PREV_INUSE);
2864 mchunkptr oldtop = top;
2865 INTERNAL_SIZE_T oldtopsize = chunksize(top);
2948 long top_size; /* Amount of top-most memory */
2955 top_size = chunksize(top);
2965 if (current_brk != (char*)(top) + top_size)
2976 top_size = current_brk - (char*)top;
2980 set_head(top, top_size | PREV_INUSE);
2982 check_chunk(top);
2988 /* Success. Adjust top accordingly. */
2989 set_head(top, (top_size - extra) | PREV_INUSE);
2991 check_chunk(top);
3047 INTERNAL_SIZE_T avail = chunksize(top);
3058 q < top && inuse(q) && (long)(chunksize(q)) >= (long)MINSIZE;
3072 current_mallinfo.keepcost = chunksize(top);
3200 * Support another case of realloc via move into top