add: if (!kernel_startup && !are_interrupts_enabled()) panic("realloc(): called with interrupts disabled\n");
context: realloc(void *address, size_t newSize){	void *newAddress = NULL;	size_t maxSize = 0, minSize;	if (address != NULL && ((addr)address < heap_base || (addr)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) / 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);			// does the new allocation simply fit in the bin?		if (newSize > minSize && newSize < maxSize)			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;}