Skip to content

Commit

Permalink
Don't use FixedSizeAllocator in CallContext if FSA is disabled.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/boehm_gc@43362 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Jan 1, 2010
1 parent 6032cba commit 9abf6e6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/pmc/callcontext.pmc
Expand Up @@ -40,8 +40,6 @@ typedef struct Pcc_cell
#define CELL_PMC(c) UNTAG_CELL(c)->u.p

#define NEXT_CELL(c) UNTAG_CELL(c)->next
#define FREE_CELL(i, c) \
Parrot_gc_free_fixed_size_storage((i), sizeof (Pcc_cell), (UNTAG_CELL(c)))

#define CELL_TYPE_MASK(c) (PTR2INTVAL(c)) & 3
#define INTCELL 0
Expand All @@ -61,8 +59,17 @@ typedef struct Pcc_cell
#define SET_CELL_PMC(c) \
INTVAL2PTR(Pcc_cell *, PTR2INTVAL(UNTAG_CELL(c)) | PMCCELL)

#define ALLOC_CELL(i) \
(Pcc_cell *)Parrot_gc_allocate_fixed_size_storage((i), sizeof (Pcc_cell))
#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

#define INIT_CELL_INT(c) INTVAL2PTR(Pcc_cell *, PTR2INTVAL(c) | INTCELL)
#define INIT_CELL_FLOAT(c) INTVAL2PTR(Pcc_cell *, PTR2INTVAL(c) | FLOATCELL)
Expand Down

0 comments on commit 9abf6e6

Please sign in to comment.