summaryrefslogtreecommitdiffstats
path: root/doc/FAQ
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-18 20:04:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-08-18 20:04:43 +0000
commitfc766ef51e7d94807fba60a00e7ab45b8e0a7ad1 (patch)
tree30b029da38e59689c42d6bc910dd5131b3bd1d26 /doc/FAQ
parentPatch from Jimen Ching <jimen@adtech-inc.com>: (diff)
downloadrtems-fc766ef51e7d94807fba60a00e7ab45b8e0a7ad1.tar.bz2
Added section on malloc reentrancy.
Diffstat (limited to 'doc/FAQ')
-rw-r--r--doc/FAQ/debug.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/FAQ/debug.t b/doc/FAQ/debug.t
index 3f88612df3..9c7e9a8ce0 100644
--- a/doc/FAQ/debug.t
+++ b/doc/FAQ/debug.t
@@ -10,6 +10,28 @@
The questions in this category are hints that can ease debugging.
+@section Malloc
+
+@subsection Is malloc reentrant?
+
+Yes. The RTEMS Malloc implementation is reentrant. It is
+implemented as calls to the Region Manager in the Classic API.
+
+@subsection When is malloc initialized?
+
+During BSP initialization, the @code{bsp_libc_init} routine
+is called. This routine initializes the heap as well as
+the RTEMS system call layer (open, read, write, etc.) and
+the RTEMS reentrancy support for the Cygnus newlib Standard C
+Library.
+
+The @code{bsp_libc_init} routine is passed the size and starting
+address of the memory area to be used for the program heap as well
+as the amount of memory to ask @code{sbrk} for when the heap is
+exhausted. For most BSPs, all memory available is placed in the
+program heap thus it can not be extended dynamically by calls to
+@code{sbrk}.
+
@section How do I determine how much memory is left?
First there are two types of memory: RTEMS Workspace and Program Heap.