Lines Matching defs:free

36  *	nodes are ordered by ascending addresses (thus minimizing free
59 static bool morecore(uint); /* get more memory into free space */
63 #define free_t void /* ANSI says void free(ptr_t ptr) */
67 #define free_t int /* BSD says int free(ptr_t ptr) */
84 Freehdr _root = NIL; /* root of free space list */
88 /* free header list management */
133 * Inserts a new node in the free space tree, placing it
516 * remainder of the block goes back to free space.
528 * the free space list.
535 * this because free() does not specify a length.
550 * free(p)
551 * return a block to the free space tree.
554 * Starting at the root, search for and coalesce free blocks
564 free(ptr_t ptr)
567 Freehdr *fpp; /* For deletion from free list */
584 error("free: illegal address (%#x)\n", ptr);
607 error("free: bad block size (%d) at %#x\n",
618 * node, coalescing adjacent free blocks along the way.
641 error("free: blocks %#x, %#x overlap\n",
664 error("free: block %#x was already free\n",
678 error("free: block %#x was already free\n", (int)ptr);
691 * Insert the new node into the free space tree
696 } /*free*/
703 * Returns the remainder to free space. Returns the
714 * and return the remainder to free space.
722 __mallinfo.allocated++; /* negate effect of free() */
724 free(remainder->data);
739 * block may be busy, free, or may even be nested within a free
745 * free(ptr);
746 * free(dummy);
809 * At this point, we can guarantee that oldblk is out of free
834 * Block is to be expanded. Look for adjacent free memory.
838 * Search for the adjacent block in the free
868 * neighboring block is free; is it big enough?
875 * remainder to free storage.
889 * free lunch.
898 * At this point, we know there is no free space in which to
900 * and free the old block, IN THAT ORDER.
905 free(oldblk->data);
918 * is in the free list, remove it from the free list.
919 * 'oldblk' and 'oldsize' are assumed to include the free block header.
922 * Returns 0 if block was not in free list.
923 * Returns -1 if block spans a free/allocated boundary (error() called
936 * Search the free space list for a node describing oldblk,
960 * Found oldblk in the free space tree; delete it.
1016 error("realloc: block %#x straddles free block boundary\n", oldblk);
1029 * the one on the left to free space.
1039 free(freeblk->data);
1051 * the ends to free space.
1076 * return the fragments to free space
1078 free(freeblk->data);
1079 free(oldneighbor->data);
1086 return(0); /* free block not found */
1093 * free space tree.
1101 * -- free space (delimited by the extern variable _ubound) is
1144 free(p->data);
1151 * Get a free block header from the free header list.
1193 * Free a free block header
1228 * done by malloc() and free(). level is interpreted as follows:
1230 * 0: malloc() and free() return 0 if error detected in arguments
1232 * 1: malloc() and free() abort if errors detected in arguments
1234 * to malloc() or free()
1249 * check a free space tree pointer. Should be in
1250 * the static free pool or somewhere in the heap.
1270 * returns 1 if free space tree p satisfies internal consistency
1344 * in the heap (both free and busy) and checks for bad blocks.
1398 error("malloc_verify: free space tree corrupted\n");
1406 * uses malloc() and free(), one of which probably got us here in