Ruby: ext/objspace/objspace.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Functions
objspace.c File Reference
`#include "gc.h"`
`#include "internal.h"`
`#include "internal/class.h"`
`#include "internal/compilers.h"`
`#include "internal/hash.h"`
`#include "internal/imemo.h"`
`#include "internal/sanitizers.h"`
`#include "node.h"`
`#include "ruby/io.h"`
`#include "ruby/re.h"`
`#include "ruby/st.h"`
`#include "symbol.h"`
`#include "ruby/ruby.h"`

Go to the source code of this file.

## Data Structures
struct | total_data
struct | obj_itr
struct | dynamic_symbol_counts
struct | rof_data
struct | rofr_data

## Macros
#define | CASE_TYPE(t) case t: type = ID2SYM(rb_intern(#t)); break;
#define | COUNT_NODE(n) case n: node = ID2SYM(rb_intern(#n)); goto set

## Typedefs
typedef void(* | each_obj_with_flags) (VALUE, void *)

## Functions
size_t | rb_sym_immortal_count (void)
void | Init_object_tracing (VALUE rb_mObjSpace)
void | Init_objspace_dump (VALUE rb_mObjSpace)
void | Init_objspace (void)

## Macro Definition Documentation

## ◆ CASE_TYPE

#define CASE_TYPE | ( |  | t | ) | case t: type = ID2SYM(rb_intern(#t)); break;

## ◆ COUNT_NODE

#define COUNT_NODE | ( |  | n | ) | case n: node = ID2SYM(rb_intern(#n)); goto set

## Typedef Documentation

## ◆ each_obj_with_flags

typedef void(* each_obj_with_flags) (VALUE, void *)

Definition at line 78 of file objspace.c.

## Function Documentation

## ◆ Init_object_tracing()

void Init_object_tracing | ( | VALUE | rb_mObjSpace | ) |

Definition at line 561 of file object_tracing.c.

References rb_define_module(), and rb_define_module_function.

Referenced by Init_objspace().

## ◆ Init_objspace()

void Init_objspace | ( | void |  | ) |

Definition at line 965 of file objspace.c.

References Init_object_tracing(), Init_objspace_dump(), rb_cObject, rb_const_get(), rb_define_class_under(), rb_define_method, rb_define_module(), rb_define_module_function, rb_intern(), and rb_undef_alloc_func().

## ◆ Init_objspace_dump()

void Init_objspace_dump | ( | VALUE | rb_mObjSpace | ) |

Definition at line 622 of file objspace_dump.c.

References rb_define_module(), rb_define_module_function, and rb_obj_gc_flags().

Referenced by Init_objspace().

## ◆ rb_sym_immortal_count()

size_t rb_sym_immortal_count | ( | void |  | ) |

Definition at line 998 of file symbol.c.

References rb_symbols_t::last_id, and ruby_global_symbols.