MentOS  0.8.0
The Mentoring Operating System
Functions
kheap.h File Reference

Interface for kernel heap functions, also provides a placement malloc() for use before the heap is initialised. More...

Go to the source code of this file.

Functions

void * sys_brk (void *addr)
 User malloc. More...
 

Detailed Description

Interface for kernel heap functions, also provides a placement malloc() for use before the heap is initialised.

Function Documentation

◆ sys_brk()

void* sys_brk ( void *  addr)

User malloc.

Parameters
addrThis argument is treated as an address of a dynamically allocated memory if falls inside the process heap area. Otherwise, it is treated as an amount of memory that should be allocated.
Returns
NULL if there is no more memory available or we were freeing a previously allocated memory area, the address of the allocated space otherwise.