4 ms·
The counter reports all heap-allocated memory, not just memory that persists after the function call, and the description in the post doesn't look quite right.
by simonster 10y ago
The counter reports all heap-allocated memory, not just memory that persists after the function call, and the description in the post doesn't look quite right. The 208 bytes come almost entirely from calling the function from the global scope. Inside a function, there would only be 16 bytes of memory allocated on the heap, for the generator itself (which we desperately want to get rid of, but that is still WIP) and the return value would live in registers or on the stack.
- jamii 10y ago> which we desperately want to get rid of Would that be covered by https://github.com/JuliaLang/julia/pull/18632 https://github.com/JuliaLang/julia/pull/18632 or is it a separate issue? I have some really ugly code that ought to be built out of nested generators, but I can't afford the millions of heap allocations.