[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sparc stack and heap
- Date: Tue, 25 Jul 2006 12:15:08 +0200
- From: aconchillo at ieec.fcr.es (Aleix Conchillo Flaqué)
- Subject: sparc stack and heap
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