Embed ThreadGroup object
These are rare but embedding them is trivial and make them fit in a 40B slot.
This commit is contained in:
parent
295d648f76
commit
c8d99fa662
14
thread.c
14
thread.c
@ -4693,16 +4693,14 @@ struct thgroup {
|
|||||||
int enclosed;
|
int enclosed;
|
||||||
};
|
};
|
||||||
|
|
||||||
static size_t
|
|
||||||
thgroup_memsize(const void *ptr)
|
|
||||||
{
|
|
||||||
return sizeof(struct thgroup);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const rb_data_type_t thgroup_data_type = {
|
static const rb_data_type_t thgroup_data_type = {
|
||||||
"thgroup",
|
"thgroup",
|
||||||
{0, RUBY_TYPED_DEFAULT_FREE, thgroup_memsize,},
|
{
|
||||||
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
|
0,
|
||||||
|
RUBY_TYPED_DEFAULT_FREE,
|
||||||
|
NULL, // No external memory to report
|
||||||
|
},
|
||||||
|
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_EMBEDDABLE
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user