From fc766ef51e7d94807fba60a00e7ab45b8e0a7ad1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 18 Aug 1999 20:04:43 +0000 Subject: Added section on malloc reentrancy. --- doc/FAQ/debug.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc/FAQ') 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. -- cgit v1.2.3