GC for pure functions -- implementation ideas
Don
nospam at nospam.com
Fri Apr 15 14:50:22 PDT 2011
Sean Kelly wrote:
> On Apr 15, 2011, at 1:12 PM, Don wrote:
>> Create a pure heap for each thread. This is a heap which can only be
>> used by pure functions. I present some simplistic code, with the
>> simplest possible implementation: just a big block of memory with a thread local 'stack pointer' which points to the first free slot.
>
> It's a good idea. dsimcha was already going to polish his TempAlloc, wasn't he? Seems like this is nearly the same thing.
Yes. You could think of it as a way the compiler could automatically
convert 'new' into a use of TempAlloc, in many useful cases.
More information about the Digitalmars-d
mailing list