Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions
gc.c File Reference
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include "mruby.h"
#include "mruby/array.h"
#include "mruby/class.h"
#include "mruby/data.h"
#include "mruby/hash.h"
#include "mruby/proc.h"
#include "mruby/range.h"
#include "mruby/variable.h"
#include "mruby/gc.h"
Include dependency graph for gc.c:

Go to the source code of this file.

Data Structures

struct  free_obj
struct  RVALUE
struct  heap_page

Macros

#define GC_INVOKE_TIME_REPORT(s)
#define GC_TIME_START
#define GC_TIME_STOP_AND_REPORT
#define DEBUG(x)
#define GC_STEP_SIZE   1024
#define MRB_HEAP_PAGE_SIZE   1024
#define DEFAULT_GC_INTERVAL_RATIO   200
#define DEFAULT_GC_STEP_RATIO   200
#define DEFAULT_MAJOR_GC_INC_RATIO   200
#define is_generational(mrb)   ((mrb)->is_generational_gc_mode)
#define is_major_gc(mrb)   (is_generational(mrb) && (mrb)->gc_full)
#define is_minor_gc(mrb)   (is_generational(mrb) && !(mrb)->gc_full)

Functions

void * mrb_realloc_simple (mrb_state *mrb, void *p, size_t len)
void * mrb_realloc (mrb_state *mrb, void *p, size_t len)
void * mrb_malloc (mrb_state *mrb, size_t len)
void * mrb_malloc_simple (mrb_state *mrb, size_t len)
void * mrb_calloc (mrb_state *mrb, size_t nelem, size_t len)
void mrb_free (mrb_state *mrb, void *p)
void mrb_init_heap (mrb_state *mrb)
void mrb_free_heap (mrb_state *mrb)
void mrb_gc_protect (mrb_state *mrb, mrb_value obj)
struct RBasicmrb_obj_alloc (mrb_state *mrb, enum mrb_vtype ttype, struct RClass *cls)
void mrb_gc_mark (mrb_state *mrb, struct RBasic *obj)
void mrb_incremental_gc (mrb_state *mrb)
void mrb_full_gc (mrb_state *mrb)
void mrb_garbage_collect (mrb_state *mrb)
int mrb_gc_arena_save (mrb_state *mrb)
void mrb_gc_arena_restore (mrb_state *mrb, int idx)
void mrb_field_write_barrier (mrb_state *mrb, struct RBasic *obj, struct RBasic *value)
void mrb_write_barrier (mrb_state *mrb, struct RBasic *obj)
void mrb_objspace_each_objects (mrb_state *mrb, each_object_callback *callback, void *data)
void mrb_init_gc (mrb_state *mrb)

Macro Definition Documentation

#define DEBUG (   x)

Definition at line 165 of file gc.c.

#define DEFAULT_GC_INTERVAL_RATIO   200

Definition at line 325 of file gc.c.

#define DEFAULT_GC_STEP_RATIO   200

Definition at line 326 of file gc.c.

#define DEFAULT_MAJOR_GC_INC_RATIO   200

Definition at line 327 of file gc.c.

#define GC_INVOKE_TIME_REPORT (   s)

Definition at line 157 of file gc.c.

#define GC_STEP_SIZE   1024

Definition at line 168 of file gc.c.

#define GC_TIME_START

Definition at line 158 of file gc.c.

#define GC_TIME_STOP_AND_REPORT

Definition at line 159 of file gc.c.

#define is_generational (   mrb)    ((mrb)->is_generational_gc_mode)

Definition at line 328 of file gc.c.

#define is_major_gc (   mrb)    (is_generational(mrb) && (mrb)->gc_full)

Definition at line 329 of file gc.c.

#define is_minor_gc (   mrb)    (is_generational(mrb) && !(mrb)->gc_full)

Definition at line 330 of file gc.c.

#define MRB_HEAP_PAGE_SIZE   1024

Definition at line 249 of file gc.c.

Function Documentation

void* mrb_calloc ( mrb_state mrb,
size_t  nelem,
size_t  len 
)

Definition at line 221 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_field_write_barrier ( mrb_state mrb,
struct RBasic obj,
struct RBasic value 
)

Definition at line 1055 of file gc.c.

Here is the caller graph for this function:

void mrb_free ( mrb_state mrb,
void *  p 
)

Definition at line 243 of file gc.c.

Here is the caller graph for this function:

void mrb_free_heap ( mrb_state mrb)

Definition at line 353 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_full_gc ( mrb_state mrb)

Definition at line 1004 of file gc.c.

Here is the caller graph for this function:

void mrb_garbage_collect ( mrb_state mrb)

Definition at line 1032 of file gc.c.

Here is the call graph for this function:

void mrb_gc_arena_restore ( mrb_state mrb,
int  idx 
)

Definition at line 1044 of file gc.c.

Here is the caller graph for this function:

int mrb_gc_arena_save ( mrb_state mrb)

Definition at line 1038 of file gc.c.

Here is the caller graph for this function:

void mrb_gc_mark ( mrb_state mrb,
struct RBasic obj 
)

Definition at line 569 of file gc.c.

Here is the caller graph for this function:

void mrb_gc_protect ( mrb_state mrb,
mrb_value  obj 
)

Definition at line 382 of file gc.c.

Here is the caller graph for this function:

void mrb_incremental_gc ( mrb_state mrb)

Definition at line 966 of file gc.c.

Here is the caller graph for this function:

void mrb_init_gc ( mrb_state mrb)

Definition at line 1294 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_init_heap ( mrb_state mrb)

Definition at line 333 of file gc.c.

Here is the caller graph for this function:

void* mrb_malloc ( mrb_state mrb,
size_t  len 
)

Definition at line 209 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void* mrb_malloc_simple ( mrb_state mrb,
size_t  len 
)

Definition at line 215 of file gc.c.

Here is the call graph for this function:

struct RBasic* mrb_obj_alloc ( mrb_state mrb,
enum mrb_vtype  ttype,
struct RClass cls 
)
read

Definition at line 389 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_objspace_each_objects ( mrb_state mrb,
each_object_callback callback,
void *  data 
)

Definition at line 1270 of file gc.c.

Here is the caller graph for this function:

void* mrb_realloc ( mrb_state mrb,
void *  p,
size_t  len 
)

Definition at line 187 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void* mrb_realloc_simple ( mrb_state mrb,
void *  p,
size_t  len 
)

Definition at line 172 of file gc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void mrb_write_barrier ( mrb_state mrb,
struct RBasic obj 
)

Definition at line 1082 of file gc.c.

Here is the caller graph for this function: