On Thu, 15 Sep 2011 00:14:53 +0300, dsimcha <[email protected]> wrote:
== Quote from Vladimir Panteleev ([email protected])'s article
On Sun, 11 Sep 2011 19:51:02 +0300, dsimcha <[email protected]> wrote:
> https://github.com/dsimcha/TempAlloc/tree/master/std/allocators
I'm thinking of adjusting std.zlib functions/classes to take an optional
allocator parameter (since currently its heap allocations are a huge
target for false pointers). What should the default allocator be?
Perhaps
std.allocators.gc should have a static default GCAllocator instance?
May be a good idea. In fact, just because of GCAllocator's status as
the obvious
choice for a default allocator, maybe there should be two enums: (feel
free to
suggest better names) ScanningGcAllocator and NonScanningGcAllocator.
These would
provide standardized, self-documenting defaults.
Sounds great :) I see scanForPointers only affects the allocate method, so
it won't affect code using typed allocators.
Tiny nitpick: case of "GC" in type/enum names should probably match for
consistency.
--
Best regards,
Vladimir mailto:[email protected]