Hi,
I have some questions about memory allocation in uClinux for the ARM
architecture.
I found out that there are 2 memory allocation functions: malloc and
malloc-simple. I think the article was on Blackfin, but I think same applies
to ARM. Anyway, I also read that malloc-simple doesn't exist anymore, and it
actually replaced malloc. Is this true?
Also, I have a question about how the stack and the heap of a process. The
stack is defined at compile time, however how does the heap grow at run time
without VM? I read that uClinux manages the free space using a global pool.
Is the heap of a process grown contiguously in the global pool? If yes, then
what happens if another process gets loaded and the heap of the first
process overwrites the second process? If no, then how is this possible to
manage without a VM?
I also read that uClinux developers need to be aware of memory fragmentation
and "try to utilize smaller allocation blocks". What exactly does that mean?
Does it mean that it is better to have "for i = 1 to 1000 { malloc(1) }"
than "malloc(1000)"?
I apologize if the questions are too naive, but I spent a long time in a
non-C environment and it is tough to get back on the horse now.
Thanks,
Tiberiu
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev