nrfcxx  0.1.0
C++-17 Framework for Nordic nRF5 Devices
system.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 /* Copyright 2014-2019 Peter A. Bigot */
3 
19 #ifndef NRFCXX_NEWLIB_SYSTEM_H
20 #define NRFCXX_NEWLIB_SYSTEM_H
21 #pragma once
22 
23 #include <stdbool.h>
24 #include <unistd.h>
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif /* __cplusplus */
30 
40 void* _nrfcxx_sbrk_fatal (ptrdiff_t increment);
41 
47 void* _nrfcxx_sbrk_heap (ptrdiff_t increment);
48 
59 void* _nrfcxx_sbrk_fixedstack (ptrdiff_t increment);
60 
70 void* _nrfcxx_sbrk_dynstack (ptrdiff_t increment);
71 
79 void* _nrfcxx_sbrk_unlimitedstack (ptrdiff_t increment);
80 
127 void* _sbrk (intptr_t increment);
128 
150 void* _nrfcxx_sbrk_error (void* brk,
151  ptrdiff_t current,
152  ptrdiff_t increment);
153 
169 bool _nrfcxx_cstdio_allowed (bool allowed);
170 
173 size_t _nrfcxx_heap_used (void);
174 
175 #ifdef __cplusplus
176 }
177 #endif /* __cplusplus */
178 
179 #endif /* NRFCXX_NEWLIB_SYSTEM_H */
_nrfcxx_sbrk_error
void * _nrfcxx_sbrk_error(void *brk, ptrdiff_t current, ptrdiff_t increment)
This function is invoked whenever _sbrk() runs out of memory.
_nrfcxx_sbrk_fixedstack
void * _nrfcxx_sbrk_fixedstack(ptrdiff_t increment)
An sbrk() implementation that allows heap (growing up) to grow to the bottom of a reserved stack regi...
_sbrk
void * _sbrk(intptr_t increment)
The system function used to allocate memory for use by libc heap memory management.
_nrfcxx_cstdio_allowed
bool _nrfcxx_cstdio_allowed(bool allowed)
Function used to control whether the automatic enabling of UART to support stdio operations is suppor...
_nrfcxx_sbrk_fatal
void * _nrfcxx_sbrk_fatal(ptrdiff_t increment)
An sbrk() implementation that rejects any attempt to allocate memory dynamically.
_nrfcxx_sbrk_dynstack
void * _nrfcxx_sbrk_dynstack(ptrdiff_t increment)
An sbrk() implementation that allows heap (growing up) and stack (growing down) to share a region of ...
_nrfcxx_sbrk_unlimitedstack
void * _nrfcxx_sbrk_unlimitedstack(ptrdiff_t increment)
An sbrk() implementation that allows heap (growing up) and stack (growing down) to share a region of ...
_nrfcxx_sbrk_heap
void * _nrfcxx_sbrk_heap(ptrdiff_t increment)
An sbrk() implementation that depends on a fixed heap allocated within the standard startup infrastru...
_nrfcxx_heap_used
size_t _nrfcxx_heap_used(void)
Return the amount of heap memory currently in use within the system, in bytes.