Changeset 798 in webkit for trunk/JavaScriptCore/kjs/collector.h


Ignore:
Timestamp:
Mar 21, 2002, 4:31:57 PM (23 years ago)
Author:
mjs
Message:

Merged changes from LABYRINTH_KDE_3_MERGE branch.

File:
1 edited

Legend:

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

    r6 r798  
     1// -*- c-basic-offset: 2 -*-
    12/*
    23 *  This file is part of the KDE libraries
    34 *  Copyright (C) 1999-2000 Harri Porten ([email protected])
     5 *  Copyright (C) 2001 Peter Kelly ([email protected])
    46 *
    57 *  This library is free software; you can redistribute it and/or
     
    1618 *  License along with this library; if not, write to the Free Software
    1719 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     20 *
     21 *  $Id$
    1822 */
    1923
     
    4044#include <stdlib.h>
    4145
     46// for DEBUG_*
     47#include "value.h"
     48#include "object.h"
     49#include "types.h"
     50#include "interpreter.h"
     51
    4252namespace KJS {
    4353
    44   class Imp;
    4554  class CollectorBlock;
    4655
     
    6675     * Run the garbage collection. This involves calling the delete operator
    6776     * on each object and freeing the used memory.
    68      * In the current implemenation this will basically free all registered
    69      * object regardless whether they are still references by others or not.
    70      *
    7177     */
    72     static void collect();
     78    static bool collect();
    7379    static int size() { return filled; }
     80    static bool outOfMemory() { return memLimitReached; }
    7481
    7582#ifdef KJS_DEBUG_MEM
     83    /** Check that nothing is left when the last interpreter gets deleted */
     84    static void finalCheck();
    7685    /**
    7786     * @internal
     
    8493    static unsigned long filled;
    8594    static unsigned long softLimit;
     95    static unsigned long timesFilled;
     96    static unsigned long increaseLimitAt;
     97    static bool memLimitReached;
    8698    enum { BlockSize = 100 };
    8799  };
Note: See TracChangeset for help on using the changeset viewer.