distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
sbrk_r.cpp File Reference

_sbrk_r() system call implementation More...

#include <cerrno>
#include <cstdint>
Include dependency graph for sbrk_r.cpp:

Functions

void * _sbrk_r (_reent *, const intptr_t size)
 Increase program data space. More...
 

Detailed Description

_sbrk_r() system call implementation

Author
Copyright (C) 2014 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Function Documentation

◆ _sbrk_r()

void* _sbrk_r ( _reent *  ,
const intptr_t  size 
)

Increase program data space.

This version of _sbrk_r() requires the heap area to be defined explicitly in linker script with symbols __heap_start and __heap_end.

Parameters
[in]sizeis the requested data space size
Returns
pointer to new data space