Lazuli
Data Structures | Functions
memory.h File Reference

Memory management API. More...

#include <Lazuli/common.h>

Go to the source code of this file.

Data Structures

struct  AllocationMap
 Represents a map of the allocated memory regions and useful memory handlers for a task or the kernel. More...
 

Functions

void * KIncrementalMalloc (const size_t size)
 Allocate memory for kernel objects using incremental method. More...
 
void Memory_Copy (const void *source, void *destination, const size_t size)
 Copy bytes from one location to another in main memory. More...
 

Detailed Description

Memory management API.

Defines base types and operations for memory management.

Definition in file memory.h.

Function Documentation

◆ KIncrementalMalloc()

void* KIncrementalMalloc ( const size_t  size)

Allocate memory for kernel objects using incremental method.

Parameters
sizeThe size in bytes to allocate.
Returns
A pointer to the allocated region, or NULL if allocation is impossible.

Definition at line 67 of file memory.c.

◆ Memory_Copy()

void Memory_Copy ( const void *  source,
void *  destination,
const size_t  size 
)

Copy bytes from one location to another in main memory.

Parameters
sourceA pointer to the source address in RAM.
destinationA pointer to the destination address in RAM.
sizeThe number of bytes to copy.

Definition at line 73 of file memory.c.