malloc and arm-elf
2004-04-22 by Milos Prokic
Hi everyone,
Does anybody know how to limit the heap for the malloc to use just certain amount of space in the memory. They way the gnu library is set right now is that it hooks to the \u201c_end\u201d; symbol that it gets from the linker. That\u2019s the starting point, how about the end of the heap space?
I thought of redefining the \u201csbrk\u201d function in my code, so when malloc calls hopefully it will limit the heap to some value. I saw that stdiio for AVR has two global variables (symbols) __heap_end and __heap_start to limit the heap to certain memory space.
Any ideas?
Thanks a million,
m.