KJS
KJS::Collector Class Reference
#include <collector.h>
Detailed Description
Garbage collector.Definition at line 41 of file collector.h.
Static Public Member Functions | |
| static void * | allocate (size_t s) |
| static bool | collect () |
| static size_t | size () |
| static bool | isOutOfMemory () |
| static void | protect (JSValue *) |
| static void | unprotect (JSValue *) |
| static size_t | numInterpreters () |
| static size_t | numProtectedObjects () |
| static HashCountedSet< const char * > * | rootObjectTypeCounts () |
| static void | registerThread () |
| static bool | isCellMarked (const JSCell *) |
| static void | markCell (JSCell *) |
Member Function Documentation
| void * KJS::Collector::allocate | ( | size_t | s | ) | [static] |
Register an object with the collector.
The following assumptions are made:
- the operator new() of the object class is overloaded.
- operator delete() has been overloaded as well and does not free the memory on its own.
- Parameters:
-
s Size of the memory to be registered.
- Returns:
- A pointer to the allocated memory.
Definition at line 291 of file collector.cpp.
| bool KJS::Collector::collect | ( | ) | [static] |
Run the garbage collection.
This involves calling the delete operator on each object and freeing the used memory.
Definition at line 618 of file collector.cpp.
| size_t KJS::Collector::size | ( | ) | [static] |
Definition at line 803 of file collector.cpp.
| static bool KJS::Collector::isOutOfMemory | ( | ) | [inline, static] |
Definition at line 62 of file collector.h.
| void KJS::Collector::protect | ( | JSValue * | k | ) | [static] |
Definition at line 585 of file collector.cpp.
| void KJS::Collector::unprotect | ( | JSValue * | k | ) | [static] |
Definition at line 596 of file collector.cpp.
| size_t KJS::Collector::numInterpreters | ( | ) | [static] |
Definition at line 814 of file collector.cpp.
| size_t KJS::Collector::numProtectedObjects | ( | ) | [static] |
Definition at line 827 of file collector.cpp.
| HashCountedSet< const char * > * KJS::Collector::rootObjectTypeCounts | ( | ) | [static] |
Definition at line 865 of file collector.cpp.
| static void KJS::Collector::registerThread | ( | ) | [static] |
Definition at line 168 of file collector.h.
| void KJS::Collector::markCell | ( | JSCell * | cell | ) | [inline, static] |
Definition at line 173 of file collector.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference