sparc stack and heap

Aleix Conchillo Flaqué aconchillo at ieec.fcr.es
Tue Jul 25 10:15:08 UTC 2006


Hi,

this is probably a basic question, but I've been looking at the code  
and I don't see it.

I was trying to see how the stack and heap works in RTEMS as we need  
to define a memory mapping for our application.

Looking at the code, I see that the libc memory manager is  
initialised in c/src/lib/libbsp/sparc/shared/bspstart.c in the  
bsp_pretasking_hook function. There, the heap_start is initialised  
(using the "end" variable that comes from the linkcmds file), also  
the heap_size is initialised. To initialise it, a STACK_SIZE define  
is used, the value is 16*1024. Also, the CPU_STACK_MINIMUM_SIZE for  
SPARC is 1024*4, which if I have understood it right, is the stack  
size for a single task.

Does this mean that we only can have 4 tasks? If we have more tasks,  
could the end of the heap be overwritten?

I'm probably missing something. Thanks in advance.

Cheers,

aleix







More information about the users mailing list