[Bug 574887] [c.runtime] revisit etRuntime MemoryManagement
Bugzilla Link | 574887 |
Status | NEW |
Importance | P3 normal |
Reported | Jul 16, 2021 06:48 EDT |
Modified | Jul 16, 2021 12:25 EDT |
Description
etMemory registers to etRuntime MemoryManagement. This is not documented, which causes the pitfall that one might to forget to unregister. Otherwise there will be invalid pointer in the registry.
Further, etRuntime_registerMemoryManagement uses hardcoded malloc.
Both points are not ideal for embedded. We could remove the automatic registration to avoid bad behavior. Long term we should introduce the concept of eager alloc in the runtime.