All calls to malloc are redirected to the memory pool in PT52-Lua. The test code has a split memory heap, so malloc calls fetch memory off the heap and pt_malloc calls grab memory from the pool. So that malloc if present might be a problem if it doesn't clean up after it's done.Nice implementation using a memory pool! I just read the NewLib rand() may call malloc(), not saying you use rand(), but whoa, what a gotcha!
https://dunkels.com/adam/rand-may-call-malloc/
The only code I could find that does call malloc is in the scanline library I'm not about to rewrite that... no I've got a plan for that.
Now I'm looking at signals and how to deal with them as I have them but it looks like I can't use sigpending and some others, Since I have code that uses longjmp you can't trigger that from an interrupt or a signal handler. Working on work arounds....
Statistics: Posted by DarkElvenAngel — Wed Feb 05, 2025 1:14 am