Function Memory.allocAbs
allocAbs -- Allocate absolute memory
This function attempts to allocate memory at a given absolute memory location. Often this is used by boot-surviving entities such as recoverable ram-disks. If the memory is already being used, or if there is not enough memory to satisfy the request, AllocAbs will return null.
This block may not be exactly the same as the requested block because of rounding, but if the return value is non-zero, the block is guaranteed to contain the requested range.
Parameters
Name | Description |
---|---|
byteSize | the size of the desired block in bytes This number is rounded up to the next larger block size for the actual allocation. |
location | the address where the memory MUST be. |
flags | (see. AllocMem() for flags.) |
Returns
memoryBlock - a pointer to the newly allocated memory block, or null if failed.
Notes
If the free list is corrupt, the system will panic with alert SEN_MemCorrupt.
The MEM_BLOCKSIZE bytes past the end of an AllocAbs will be changed while relinking the next block of memory. Generally you can't trust the first MEM_BLOCKSIZE bytes of anything you AllocAbs().
See
AllocMem(), AllocAlign()