TempAlloc: an unusual request

dsimcha dsimcha at yahoo.com
Sat Jul 2 20:23:42 PDT 2011


Ping?  Ok, any more discussion about this or should I start adapting 
TempAlloc to the spec we've discussed?

On 6/20/2011 11:33 PM, Andrei Alexandrescu wrote:
> On 6/20/11 8:57 PM, dsimcha wrote:
>> On 6/20/2011 11:04 AM, Andrei Alexandrescu wrote:
>>> On 6/20/11 10:02 AM, dsimcha wrote:
>>>> == Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s
>>>> article
>>>>> On 6/19/11 6:20 PM, dsimcha wrote:
>>>>>> My other concern is that giving RegionAllocator reference semantics
>>>>>> would, IIUC, require an allocation to allocate a RegionAllocator.
>>>>>> Since
>>>>>> TempAlloc is designed to avoid global GC locks/world stopping like
>>>>>> the
>>>>>> plauge, this is obviously bad.
>>>>> I am hoping we can arrange things such that a RegionAllocator created
>>>>> from scratch initializes a new frame, whereas subsequent copies of it
>>>>> use that same frame. Would that work?
>>>>> Andrei
>>>>
>>>> No. I don't want every creation of a new frame to require a GC heap
>>>> allocation.
>>>
>>> I don't understand why such would be necessary.
>>>
>>> Andrei
>>
>> Maybe I'm missing something, but how else would a RegionAllocator have
>> reference semantics?
>
> I'm thinking along the lines of an Algebraic containing the actual state
> and a pointer to the original object.
>
> Andrei



More information about the Digitalmars-d mailing list