[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

differences between heap and workspace

On 5 Jul 1999 biguo at 263.net wrote:

> Hello,everyone!Who can tell me about differences between heap and
> workspace in rtems-4.0.0?how to config
> heap_start,heap_size,workspace_start and workspace_size?Thanks in
> advance.

Let's try part of this one from the under construction FAQ. :)

"The RTEMS Workspace is the memory used by RTEMS to allocate control
structures for system objects like tasks and semaphores, task
stacks, and some system data structures like the ready chains.
The Program Heap is where "malloc'ed" memory comes from."

workspace_size is calculated by confdefs.h.
workspace_start is set by startup/bspstart.c (usually) to workspace_size
bytes from the end of RAM for the board.
heap_start is usually the end of the BSS section.
heap_size is usually the number of bytes from the end of the BSS to the
start of the executive workspace.  

Except for workspace_size, all of this is calculated during the execution
of the code in bspstart.c (or subroutines called from it).

Does this make sense?

Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985