Nios® V Processor Software Developer Handbook

ID 743810
Date 4/01/2024
Public
Document Table of Contents

15.1.1.64. 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 want to dynamically allocate memory, use the newlib malloc() function.

Return

--