Dan Sugalski wrote:
I don't have a problem with guaranteeing zeroed memory, but it's not free. If we're going with a malloc-style allocator then I explicitly do *not* want to give guarantees of zeroed memory.
It doesn't make much sense to give Parrot_{re,}alloc different semantics depending on the memory manager and forcing users to memset their (maybe already zeroed) allocated memory.
If we want this, then lets have Parrot_{re,}allocate{,zeroed}.
The allocate_string variants are ok with unzeroed mem already.
Arguably any code that assumes zeroed memory is broken, as it ought not be using any memory its not actually filled in data for.
When implementing list.c I looked at _allocate, saw calloc and assumed, it's ok to assume, mem is zeroed - so ...
... Extended buffer headers should be zeroed past the end of the 'known' bits.
Done already, thanks to Peters hint. PMCs were ok. leo