rem: check_wall(address); address = (uint8 *)address - wall[0]; address = set_wall(wall, address, newSize, 0);
add: set_wall(wall, newSize, wall->alignment);
context: realloc(void *address, size_t newSize){	void *newAddress = NULL;	size_t maxSize = 0, minSize;	if (!kernel_startup && !are_interrupts_enabled())		panic("realloc(): called with interrupts disabled\n");	if (address != NULL && ((addr_t)address < heap_base || (addr_t)address >= (heap_base + heap_size)))		panic("realloc(): asked to realloc invalid address %p\n", address);	if (newSize == 0) {		free(address);		return NULL;	}	// find out the size of the old allocation first	if (address != NULL) {		struct heap_page *page;		mutex_lock(&heap_lock);		page = &heap_alloc_table[((unsigned)address - heap_base) / B_PAGE_SIZE];		TRACE(("realloc(): page %p: bin_index %d, free_count %d\n", page, page->bin_index, page->free_count));		if (page[0].bin_index >= bin_count)			panic("realloc(): page %p: invalid bin_index %d\n", page, page->bin_index);		maxSize = bins[page[0].bin_index].element_size;		minSize = page[0].bin_index > 0 ? bins[page[0].bin_index - 1].element_size : 0;		mutex_unlock(&heap_lock);#if USE_WALL		check_wall(address);		// The wall uses 4 bytes to store the actual length of the requested		// block, 4 bytes for the alignment offset, WALL_SIZE, and eventually		// a list_link in case USE_CHECKING_WALL is defined		newSize += 2*WALL_SIZE + 8 + 2*WALL_MIN_ALIGN;#	if USE_CHECKING_WALL		newSize += sizeof(struct list_link);#	endif#endif	// USE_WALL		// does the new allocation simply fit in the bin?		if (newSize > minSize && newSize < maxSize) {#if USE_WALL			// update the wall to the new size			uint32 *wall = get_wall(address, 0);			check_wall(address);			address = (uint8 *)address - wall[0];			address = set_wall(wall, address, newSize, 0);#endif			return address;		}	}	// if not, allocate a new chunk of memory	newAddress = malloc(newSize);	if (newAddress == NULL)		return NULL;	// copy the old data and free the old allocation	if (address) {		// we do have the maxSize of the bin at this point		memcpy(newAddress, address, min(maxSize, newSize));		free(address);	}	return newAddress;}