Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created February 3, 2010 00:56
Show Gist options
  • Save methodmissing/293224 to your computer and use it in GitHub Desktop.
Save methodmissing/293224 to your computer and use it in GitHub Desktop.
static void
mark_locations_array(x, n)
VALUE *x;
size_t n;
{
VALUE v;
while (n--) {
v = *x;
if (is_pointer_to_heap((void *)v)) {
gc_mark(v);
}
x++;
}
}
inline void
rb_gc_mark_locations(start, end)
VALUE *start, *end;
{
mark_locations_array(start,end - start);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment