* gc.h (rb_objspace_each_objects): used in objspace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a33fdc4ec0
commit
23b1a3d3fa
@ -1,4 +1,6 @@
|
|||||||
Sat Aug 14 14:58:13 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Aug 14 15:11:01 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* gc.h (rb_objspace_each_objects): used in objspace.
|
||||||
|
|
||||||
* vm_core.h (rb_{get,set,reset}_coverages): used in coverage.
|
* vm_core.h (rb_{get,set,reset}_coverages): used in coverage.
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <ruby/io.h>
|
#include <ruby/io.h>
|
||||||
#include <ruby/re.h>
|
#include <ruby/re.h>
|
||||||
#include <../../node.h>
|
#include <../../node.h>
|
||||||
|
#include <../../gc.h>
|
||||||
|
|
||||||
size_t rb_str_memsize(VALUE);
|
size_t rb_str_memsize(VALUE);
|
||||||
size_t rb_ary_memsize(VALUE);
|
size_t rb_ary_memsize(VALUE);
|
||||||
@ -36,10 +37,6 @@ size_t onig_memsize(regex_t *);
|
|||||||
size_t rb_generic_ivar_memsize(VALUE);
|
size_t rb_generic_ivar_memsize(VALUE);
|
||||||
size_t rb_objspace_data_type_memsize(VALUE obj);
|
size_t rb_objspace_data_type_memsize(VALUE obj);
|
||||||
|
|
||||||
void rb_objspace_each_objects(
|
|
||||||
int (*callback)(void *start, void *end, size_t stride, void *data),
|
|
||||||
void *data);
|
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
memsize_of(VALUE obj)
|
memsize_of(VALUE obj)
|
||||||
{
|
{
|
||||||
|
17
gc.h
17
gc.h
@ -21,13 +21,13 @@ NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
|
|||||||
#if RUBY_MARK_FREE_DEBUG
|
#if RUBY_MARK_FREE_DEBUG
|
||||||
extern int ruby_gc_debug_indent;
|
extern int ruby_gc_debug_indent;
|
||||||
|
|
||||||
static void
|
static inline void
|
||||||
rb_gc_debug_indent(void)
|
rb_gc_debug_indent(void)
|
||||||
{
|
{
|
||||||
printf("%*s", ruby_gc_debug_indent, "");
|
printf("%*s", ruby_gc_debug_indent, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static inline void
|
||||||
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
||||||
{
|
{
|
||||||
if (st == 0) {
|
if (st == 0) {
|
||||||
@ -82,4 +82,17 @@ int ruby_get_stack_grow_direction(volatile VALUE *addr);
|
|||||||
#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, a, b)
|
#define STACK_DIR_UPPER(a,b) STACK_UPPER(&stack_grow_dir_detection, a, b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 4
|
||||||
|
#pragma GCC visibility push(default)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
size_t rb_objspace_data_type_memsize(VALUE obj);
|
||||||
|
void rb_objspace_each_objects(
|
||||||
|
int (*callback)(void *start, void *end, size_t stride, void *data),
|
||||||
|
void *data);
|
||||||
|
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 4
|
||||||
|
#pragma GCC visibility pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* RUBY_GC_H */
|
#endif /* RUBY_GC_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user