Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

14.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

--