Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
kjs
kjs
kjs
collector.h
1
// -*- c-basic-offset: 2 -*-
2
/*
3
* This file is part of the KDE libraries
4
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
5
* Copyright (C) 2001 Peter Kelly (pmk@post.com)
6
* Copyright (C) 2003 Apple Computer, Inc.
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
*
22
*/
23
24
#ifndef _KJSCOLLECTOR_H_
25
#define _KJSCOLLECTOR_H_
26
27
#define KJS_MEM_LIMIT 500000
28
29
#include "global.h"
30
31
#include <stdio.h>
// for size_t
32
33
namespace
KJS {
34
38
class
Collector
{
39
// disallow direct construction/destruction
40
Collector
();
41
public
:
52
static
void
*
allocate
(
size_t
s);
57
static
bool
collect
();
58
static
int
size();
59
static
bool
outOfMemory() {
return
memoryFull; }
60
61
#ifdef KJS_DEBUG_MEM
62
65
static
void
finalCheck();
66
#endif
67
68
private
:
69
static
bool
memoryFull;
70
};
71
72
}
73
74
#endif
/* _KJSCOLLECTOR_H_ */
kjs
Skip menu "kjs"
Main Page
Class Hierarchy
Alphabetical List
Class List
File List
Class Members
Related Pages
kjs
Skip menu "kjs"
arts
dcop
dnssd
interfaces
interface
library
kspeech
ktexteditor
kabc
kate
kcmshell
kdecore
kded
kdefx
kdeprint
kdesu
kdeui
kdoctools
khtml
kimgio
kinit
kio
bookmarks
httpfilter
kfile
kio
kioexec
kpasswdserver
kssl
kioslave
http
kjs
kmdi
kmdi
knewstuff
kparts
krandr
kresources
kspell2
kunittest
kutils
kwallet
libkmid
libkscreensaver