next up previous contents index
Next: 11.4.1 alloc: Allocate a Up: 11 ``Client OS'' Library: Previous: 11.3.7 clone: Make a

11.4 Memory Interface

 

The oskit_mem COM interface defines an interface for memory allocation and deallocation for oskit libraries. As described above, the C libary malloc routines are implemented in terms of an oskit_mem object that is created when the clientos is initialized. This initial memory object is the lowest level memory allocator that is available to the application. All other memory allocators, such as the malloc library, the memdebug library (see Section 26), and the device memory allocators (see Section 8), are implemented in terms of the oskit_mem object that is created when the clientos is initialized.

The oskit_mem COM interface inherits from IUnknown, and has the following additional methods:

alloc
Allocate a chunk of memory.
realloc
Realloc a chunk of memory.
alloc_aligned
Allocate a chunk of memory, subject to an alignment constraint.
free
Free a chunk of memory that was allocated with alloc or alloc_aligned.
getsize
Inquire about the size of a chunk of memory.
alloc_gen
Allocate memory with general constraints.
avail
Return the amount of free memory.





Utah Flux Research Group