Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
memRegionAlloc.c File Reference
#include <safemem.h>
#include <thread.h>
#include <stdlib.h>

Functions

struct memregion * memRegionAlloc (uint nbytes)
 

Detailed Description

User/kernel agnostic memory allocator. Simply provides a pointer to memory that belongs to the current thread.

Function Documentation

struct memregion* memRegionAlloc ( uint  nbytes)

Attempt to allocate a region of at least nbytes to the current thread.

Parameters
nbytesnumber of byte to allocate
Returns
pointer to allocated memory