GC, the simple solution
Sean Kelly
sean at f4.ca
Mon Jun 5 09:03:12 PDT 2006
Lars Ivar Igesund wrote:
> Frank Benoit wrote:
>
>>> * The cost of removing the last pointer to an object is unbounded
>> delete can be unbound? I didn't know that.
>
> The reason is that a delete might trigger an unknown additional amount of
> decrefs leading to more deletes.
And some allocators colaesce adjacent free blocks aggressively (ie.
during delete). Not to mention the fact that the allocator data is
probably protected by a mutex, etc. In general, if the allocator
documentation makes no guarantees about progress then you may at least
be stuck on a mutex while other (potentially low-priority) threads are
making an (unbounded) allocation.
Sean
More information about the Digitalmars-d
mailing list