void *osenv_mem_alloc(oskit_size_t size, osenv_memflags_t flags, unsigned align);
ComponentOS, Blocking
This function is called by the drivers to allocate memory. Allocate the requested amount of memory with the restrictions specified by the flags argument as described above.XXX: While this is defined as blocking, the current glue code cannot yet handle this blocking, as it is not prepared for another request to enter the component. This will be fixed.
- size
- Amount of memory to allocate.
- flags
- Restrictions on memory.
- align
- Boundary on which memory should be aligned, which must be a power of two, or 0 which means the same as 1 (no restrictions).
Returns the address of the allocated block in the driver's virtual address space, or NULL if not enough memory was available.