Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
742117e7
Unverified
Commit
742117e7
authored
Jun 11, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize gray mark functions in GC.
parent
15ceb35e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/gc.c
src/gc.c
+5
-4
No files found.
src/gc.c
View file @
742117e7
...
...
@@ -960,13 +960,12 @@ root_scan_phase(mrb_state *mrb, mrb_gc *gc)
}
}
/* rough estimation of number of GC marks (non recursive) */
static
size_t
gc_gray_
mark
(
mrb_state
*
mrb
,
mrb_gc
*
gc
,
struct
RBasic
*
obj
)
gc_gray_
counts
(
mrb_state
*
mrb
,
mrb_gc
*
gc
,
struct
RBasic
*
obj
)
{
size_t
children
=
0
;
gc_mark_children
(
mrb
,
gc
,
obj
);
switch
(
obj
->
tt
)
{
case
MRB_TT_ICLASS
:
children
++
;
...
...
@@ -1064,7 +1063,9 @@ incremental_marking_phase(mrb_state *mrb, mrb_gc *gc, size_t limit)
size_t
tried_marks
=
0
;
while
(
gc
->
gray_list
&&
tried_marks
<
limit
)
{
tried_marks
+=
gc_gray_mark
(
mrb
,
gc
,
gc
->
gray_list
);
struct
RBasic
*
obj
=
gc
->
gray_list
;
gc_mark_children
(
mrb
,
gc
,
obj
);
tried_marks
+=
gc_gray_counts
(
mrb
,
gc
,
obj
);
}
return
tried_marks
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment