The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
brk.c File Reference
#include "usermode.h"
#include "kernel/process/process.h"

Functions

uintptr_t usermode_get_brk (void)
 get the current program break (end of the user heap).
void usermode_set_brk (uintptr_t brk)
 set the program break.

Function Documentation

◆ usermode_get_brk()

uintptr_t usermode_get_brk ( void )

get the current program break (end of the user heap).

Returns
current break address.

◆ usermode_set_brk()

void usermode_set_brk ( uintptr_t brk)

set the program break.

called by exec_program after ELF loading to initialize the break.

Parameters
brkthe initial break address (page-aligned end of loaded segments).