[svn:parrot] r43362 - branches/boehm_gc/src/pmc

Vasily Chekalkin bacek at bacek.com
Fri Jan 1 21:28:43 UTC 2010


chromatic wrote:
>> Don't use FixedSizeAllocator in CallContext if FSA is disabled.
>> +#if PARROT_GC_USE_FIXED_SIZE_ALLOCATOR
>> +#  define ALLOC_CELL(i) \
>> +     (Pcc_cell *)Parrot_gc_allocate_fixed_size_storage((i), sizeof 
> (Pcc_cell))
>> +#  define FREE_CELL(i, c) \
>> +     Parrot_gc_free_fixed_size_storage((i), sizeof (Pcc_cell), 
> (UNTAG_CELL(c)))
>> +#else
>> +#  define ALLOC_CELL(i) \
>> +     (Pcc_cell *)mem_sys_allocate_zeroed(sizeof (Pcc_cell))
>> +#  define FREE_CELL(i, c) \
>> +     mem_sys_free(UNTAG_CELL(c))
>> +#endif
> 
> Instead of littering lots of .c files with #idfef forests, perhaps we should 
> define a Parrot_allocate_fixed_size() macro to use in these cases instead.

Good idea. Will do.

-- 
Bacek


More information about the parrot-dev mailing list