INtime SDK Help
sbrk

Creates memory segments of the specified number of bytes.

#include <stdlib.h>

void *sbrk (unsigned segsize);

Parameters

segsize
Number of bytes to be acquired; must be greater than 0 (zero).

Remarks

For flat model applications, sbrk uses the system call AllocateRtMemory. You should use FreeRtMemory, DeleteRtMemoryHandle to delete segments acquired by sbrk.

To return the created segment to the heap using free or realloc, use malloc to get memory instead of sbrk.

Return Values

The address of the acquired memory area.
Success.
A null pointer if the allocation request cannot be satisfied.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/stdlib.h stdlib.h clib.lib

See Also

AllocateRtMemory, DeleteRtMemoryHandle, free, FreeRtMemory, malloc, realloc