Forum Discussion
Altera_Forum
Honored Contributor
14 years agoYes Socrates, I'm talking about malloc().
The thing is, that I want to improve the LwIp-Stack and there some structures (e.g. ethernetif, pbuf) allocated dynamically. As a workaround I did allocate the memory statically, but I think for a better structural design it would be nicer to allocate those structures dynamically at internal RAM. Maybe a solution could be to reassign the heap to internal RAM, then malloc(), and then put the Heap back to external RAM. But the LwIp malloc-function saves and uses the lowest free block for allocation, which is always in external Ram. Sure, I know that I could write my own malloc(), but I wanted to know if someone knows an easier or more common way.