* src/vm/jit/trace.cpp: Method tracer can now trace builtin functions as well.
[cacao.git] / src / mm / cacao-gc / region.h
1 /* mm/cacao-gc/region.h - GC header for region management
2
3    Copyright (C) 2006 R. Grafl, A. Krall, C. Kruegel,
4    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6    J. Wenninger, Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23    02110-1301, USA.
24
25 */
26
27
28 #ifndef _REGION_H
29 #define _REGION_H
30
31 #include "vm/types.h"
32
33
34 /* Forward Typedefs ***********************************************************/
35
36 typedef struct regioninfo_t regioninfo_t;
37
38
39 #include "gc.h"
40
41
42 /* Structures *****************************************************************/
43
44 struct regioninfo_t {
45 #if defined(ENABLE_THREADS)
46         java_object_t header; /* needed for locking */
47 #endif
48         u1 *base;     /* pointer to the start of this region */
49         u1 *end;      /* pointer to the end of this region */
50         u1 *ptr;      /* pointer to the beginning of the free space */
51         s4  size;     /* total size of the region (end - ptr) */
52         s4  free;     /* free space in this region */
53 };
54
55
56 /* Prototypes *****************************************************************/
57
58 void *region_create(regioninfo_t *region, u4 size);
59
60 #if defined(ENABLE_MEMCHECK)
61 void region_invalidate(regioninfo_t *region);
62 #endif
63
64
65 #endif /* _REGION_H */
66
67 /*
68  * These are local overrides for various environment variables in Emacs.
69  * Please do not remove this and leave it at the end of the file, where
70  * Emacs will automagically detect them.
71  * ---------------------------------------------------------------------
72  * Local variables:
73  * mode: c
74  * indent-tabs-mode: t
75  * c-basic-offset: 4
76  * tab-width: 4
77  * End:
78  * vim:noexpandtab:sw=4:ts=4:
79  */