[Gc] Why do replacement operator new/new[] use GC_MALLOC_UNCOLLECTABLE() instead of GC_MALLOC()?

Boehm, Hans hans.boehm at hp.com
Thu Jun 4 11:12:54 PDT 2009


The general model for gc_cpp.h is that garbage collectable memory is used only when explicitly requested, e.g. by inheriting from gc.  Thus by default ::new allocates uncollectable memory as before.  It doesn't use the system-provided allocator, since we do want to scan such memory.

This is clearly not always the right model.

Hans

________________________________
From: gc-bounces at napali.hpl.hp.com [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Talbot, George
Sent: Thursday, June 04, 2009 7:47 AM
To: gc at linux.hpl.hp.com
Subject: [Gc] Why do replacement operator new/new[] use GC_MALLOC_UNCOLLECTABLE() instead of GC_MALLOC()?

Hi all,

C++ and the collector question:  Why do the replacements for operator new[] use GC_MALLOC_UNCOLLECTABLE instead of GC_MALLOC()?

--
George T. Talbot
gtalbot at locuspharma.com<mailto:gtalbot at locuspharma.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20090604/a917b65e/attachment.htm


More information about the Gc mailing list