All heap implementations inherit from this interface.
The implementations can have additional configuration
parmeters and functions.
|metaonly config IHeap.common$ // module-wide
Common module configuration parameters
All modules have this configuration parameter. Its name
contains the '$' character to ensure it does not conflict with
configuration parameters declared by the module. This allows
new configuration parameters to be added in the future without
any chance of breaking existing modules.
|Static Instance Creation
// Create an instance-object
See specific IHeap implementation for parameters used.
|IHeap.alloc() // instance
Allocates a block of memory from the heap
size (in MADUs) of the block
alignment (in MADUs) of the block
pointer to error block
This method returns a block of memory from the heap.
It is called by the xdc.runtime.Memory.alloc()
Returns the address of the allocated memory.
|IHeap.free() // instance
Free a block of memory back to the heap
Void free(Ptr block, SizeT size);
non-NULL address of allocated block to free
size (in MADUs) of the block of memory to free
This method gives back a block of memory to a heap.
It is called by the xdc.runtime.Memory.free()
|IHeap.getStats() // instance
Retrieve the statistics from the heap
non-NULL pointer to an output buffer
The caller passes in a pointer to a xdc.runtime.Memory.Stats
structure and getStats
fills in this structure.
This function is called by the xdc.runtime.Memory.getStats()
|IHeap.isBlocking() // instance
Returns whether the heap may block during an alloc() or
If the heap might block, TRUE is returned.
If the heap does not block, FALSE is returned.