KJS::Collector Class Reference
Garbage collector. More...
#include <collector.h>
Static Public Member Functions | |
static void * | allocate (size_t s) |
static bool | collect () |
static int | size () |
static bool | outOfMemory () |
Detailed Description
Garbage collector.
Definition at line 38 of file collector.h.
Member Function Documentation
|
Register an object with the collector. The following assumptions are made:
Definition at line 82 of file collector.cpp. References KJS::ValueImp::_vd, KJS::ALLOCATIONS_PER_COLLECTION, KJS::CELL_SIZE, KJS::CELLS_PER_BLOCK, collect(), KJS::GROWTH_FACTOR, KJS::heap, and KJS::MIN_ARRAY_SIZE. Referenced by KJS::ValueImp::operator new(). |
|
Run the garbage collection. This involves calling the delete operator on each object and freeing the used memory. Definition at line 157 of file collector.cpp. References KJS::ValueImp::_flags, KJS::ValueImp::_vd, KJS::CELLS_PER_BLOCK, KJS::GROWTH_FACTOR, KJS::heap, KJS::LOW_WATER_FACTOR, KJS::ValueImp::mark(), KJS::InterpreterImp::mark(), KJS::MIN_ARRAY_SIZE, KJS::InterpreterImp::next, KJS::ValueImp::refcount, KJS::SPARE_EMPTY_BLOCKS, and KJS::ValueImp::~ValueImp(). Referenced by allocate(), and KJS::Interpreter::collect(). |
The documentation for this class was generated from the following files: