Ignore:
Timestamp:
Apr 24, 2008, 11:45:53 AM (17 years ago)
Author:
[email protected]
Message:

2008-04-24 Sam Weinig <[email protected]>

Reviewed by Geoffrey Garen.

Add a #define to easily enable collecting on every allocation to aid
debugging GC bugs.

  • kjs/collector.cpp: (KJS::Collector::heapAllocate):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r31787 r32502  
    7272
    7373#define DEBUG_COLLECTOR 0
     74#define COLLECT_ON_EVERY_ALLOCATION 0
    7475
    7576using std::max;
     
    200201  size_t usedBlocks = heap.usedBlocks;
    201202  size_t i = heap.firstBlockWithPossibleSpace;
     203
     204#if COLLECT_ON_EVERY_ALLOCATION
     205  collect();
     206#endif
    202207
    203208  // if we have a huge amount of extra cost, we'll try to collect even if we still have
Note: See TracChangeset for help on using the changeset viewer.