Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-11-06 09:08:50


David Abrahams wrote:
> Rene Rivera <grafikrobot_at_[hidden]> writes:
>
>>> If you want the finalizer to run, you have
>>> to do something to ensure that the hashtable itself is not scanned, or
>>> those strings will always be considered referenced.
>> Yes, AFAIR I do.
>
> I don't see it.

static void * hash_mem_alloc(size_t datalen, size_t size)
{
     if (sizeof(HASHDATA) == datalen)
     {
         return BJAM_MALLOC_RAW(size);
     }
     else
     {
         return BJAM_MALLOC(size);
     }
}

When bjam is using a strings hash table the hash entries only contain
the string key. The above checks for that and allocates those entries
outside the boehm collector (BJAM_MALLOC_RAW).

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk