Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

15.1.70. sbrk()

Prototype

caddr_t sbrk(int incr)

Commonly Called By

newlib C library

Thread-safe

No.

Available from ISR

No.

Include

<unistd.h>

Description

The sbrk() function dynamically extends the data segment for the application. The input argument incr is the size of the block to allocate. Do not call sbrk() directly. If you wish to dynamically allocate memory, use the newlib malloc() function.

Return

--