On Friday, 3 June 2016 at 15:04:59 UTC, Stefan Koch wrote:
Hi,
I just saw something in the Vision 2016 H2 Document, which is
very dear to me.
Improving the Memory Management in the compiler.
I think we need at least three different allocation primitives.
One for allocating Temporary Memory to which no one should keep
references that have a longer lifetime then the memory-block
itself.
One RC primitive.
And one primitive for virtually immutable memory.
One size fits all is not a solution that is going to scale.
When the details of those primitives are worked out replace
_ALL_ malloc and free pairs.
With an appropriate allocation primitive.
And I think of pump-the-pointer and never free. As a perfectly
fine allocation primitive.
If the resources are virtually immutable.
The temp-memory primitive also can be done with a
bump-the-pointer method.