On Tue, 06 Sep 2011 23:52:20 +0300, Timon Gehr <timon.g...@gmx.ch> wrote:

On 09/06/2011 10:34 PM, Vladimir Panteleev wrote:
On Tue, 06 Sep 2011 22:53:31 +0300, Jonathan M Davis
<jmdavisp...@gmx.com> wrote:

So, review away!

When the allocated region is not scanned by the GC (which is the default
for the default thread-local RegionAllocatorStack instance), I think it
would be appropriate for the newArray and uninitializedArray methods to
statically check if the type doesn't have any pointers.


That is way too restrictive. Pointers do not always point to GC allocated memory.

I'm not saying there shouldn't be a way to override it. Overriding this check would be the user's way to say "Yes, I know what I'm doing, I'm not going to put the only references to live heap objects into this region allocator".

I'd be happy with either this, or "big red warnings" saying that careless use of this module can lead to hard-to-track memory corruption bugs :)

--
Best regards,
 Vladimir                            mailto:vladi...@thecybershadow.net

Reply via email to