[CN-Exec] Don't "leak" memory #859
Labels
CN spec testing
cn
CN-exec
Related to CN executable spec generation, called using `cn instrument`
technical debt
Something for internal cleanup
AFAIU
There are two types of memory allocations in Fulminate, values used for checking (precondition, postcondition), and the global state tracking ownership.
The first is a dynamically allocated stack, so the bump allocator can be used to not leak memory.
The issue is that the bump allocator is also used for the global state, so you can't just push and pop. A solution is to use a separate buffer or allocator for the global state.
However, this decreases the total memory available to the bump allocator (due to limits to the amount of static variable allocation in a single library at least on macOS).
This appears to be solved by compiling them into separate libraries.It does not. I think I will figure this out at some point because it is fun to think about.The text was updated successfully, but these errors were encountered: