A memory of allocating memory for use by a subfunction of a computer chip,
wherein the subfunction uses contiguous memory regions, the method
comprising the steps of (a) creating a placeholder for contiguous memory
buffers used by the subfunction of the chip by reserving a region of
memory subsystem space, wherein the region does not need to be backed by
true physical storage and the size is at least as large as the contiguous
memory buffer required by the subfunction, (b) allocating pages of
remaining memory in the memory subsystem to satisfy the amount of memory
required by the subfunction, wherein the allocated pages do not
necessarily result in a contiguous memory region, (c) remapping the
allocated pages of step b into a contiguous region of the placeholder
created in step a and (d) disabling the remapping after the subfunction
is completed to free the memory in the placeholder.