• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KJS

KJS::Collector

KJS::Collector Class Reference

#include <collector.h>

List of all members.


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]

bool KJS::Collector::isCellMarked ( const JSCell *  cell  )  [inline, 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:
  • collector.h
  • collector.cpp

KJS

Skip menu "KJS"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal