- How often is allocBuffer called?
one time, on init or when playing a new file
- And for what sizes?
Forgot that... wasn't a problem for the 3.2 - in sum around ~30kB if I remember correctly
- Is it ever called with 0?
no.
- I assume he has done that to zero the memory
Yes. It's important that is zeroed.
You could use a memset, but that will not help, as it does the same.
Could it be that the heap pointers a destroyed..? wrong cache handling?
There was a thread... However, that can't happen by definition because an added comment in the core sourcecode makes sure that this can't happen. And of course everything is 32 Byte aligned... and covid does not exist.
Btw, in contrast to some prominent cache handling functions, malloc works with a zero-size call... no need to check that (but still, it does not happen here)
Simple test: If it (or something else with problems) works with cache disabled (startup.c) there is a cache problem.
Takes 2 minutes.