CACAO
Macros | Functions | Variables
heap.h File Reference

Go to the source code of this file.

Macros

#define GC_SIZE_DUMMY   0xff
 
#define GC_GET_SIZE(obj)   ((u4) (((obj)->hdrflags >> 56) & 0xff))
 
#define GC_SET_SIZE(obj, size)   ((obj)->hdrflags |= ((u8) ((size) & 0xff)) << 56)
 
#define IS_ARRAY(o)   ((o)->vftbl->arraydesc != NULL)
 
#define FOREACH_ARRAY_REF(o, ref, refptr, code)
 
#define FOREACH_OBJECT_REF(o, ref, refptr, code)
 

Functions

s4 get_object_size (java_object_t *o)
 
void heap_println_usage ()
 
void heap_print_object (java_object_t *o)
 
void heap_dump_region (regioninfo_t *region, bool marked_only)
 

Variables

s4 heap_current_size
 
s4 heap_maximal_size
 
regioninfo_theap_region_sys
 
regioninfo_theap_region_main
 

Macro Definition Documentation

#define FOREACH_ARRAY_REF (   o,
  ref,
  refptr,
  code 
)
Value:
{ \
java_objectarray_t *a = (java_objectarray_t *) o; \
arraydescriptor *desc = o->vftbl->arraydesc; \
int i; \
GC_ASSERT(desc); \
\
if (desc->arraytype == ARRAYTYPE_OBJECT) { \
for (i = 0; i < a->header.size; i++) { \
\
refptr = &( a->data[i] ); \
ref = (java_object_t *) (a->data[i]); \
\
code; \
} \
} \
}
#define GC_ASSERT(assertion)
Definition: gc.h:59
MIIterator i

Definition at line 66 of file heap.h.

#define FOREACH_OBJECT_REF (   o,
  ref,
  refptr,
  code 
)
Value:
{ \
classinfo *c = o->vftbl->class; \
int i; \
\
for (; c; c = c->super) { \
for (i = 0; i < c->fieldscount; i++) { \
f = &(c->fields[i]); \
\
if (!IS_ADR_TYPE(f->type) || (f->flags & ACC_STATIC)) \
continue; \
\
refptr = (java_object_t **) ((s1 *) o + f->offset); \
ref = *( refptr ); \
\
code; \
} \
} \
}
#define GC_ASSERT(assertion)
Definition: gc.h:59
MIIterator i
size fieldinfo
Definition: loader.cpp:91
#define IS_ADR_TYPE(a)
Definition: global.hpp:138
int8_t s1
Definition: types.hpp:39

Definition at line 85 of file heap.h.

#define GC_GET_SIZE (   obj)    ((u4) (((obj)->hdrflags >> 56) & 0xff))

Definition at line 41 of file heap.h.

#define GC_SET_SIZE (   obj,
  size 
)    ((obj)->hdrflags |= ((u8) ((size) & 0xff)) << 56)

Definition at line 42 of file heap.h.

#define GC_SIZE_DUMMY   0xff

Definition at line 38 of file heap.h.

#define IS_ARRAY (   o)    ((o)->vftbl->arraydesc != NULL)

Definition at line 65 of file heap.h.

Function Documentation

s4 get_object_size ( java_object_t o)

Definition at line 509 of file heap.c.

void heap_dump_region ( regioninfo_t region,
bool  marked_only 
)

Definition at line 476 of file heap.c.

void heap_print_object ( java_object_t o)

Definition at line 400 of file heap.c.

void heap_println_usage ( )

Definition at line 376 of file heap.c.

Variable Documentation

s4 heap_current_size

Definition at line 50 of file heap.c.

s4 heap_maximal_size

Definition at line 51 of file heap.c.

regioninfo_t* heap_region_main

Definition at line 53 of file heap.c.

regioninfo_t* heap_region_sys

Definition at line 52 of file heap.c.