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
135b4773
Commit
135b4773
authored
Apr 18, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn off major GC mode before full GC; fix #4000
parent
0866fa38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/gc.c
src/gc.c
+7
-4
No files found.
src/gc.c
View file @
135b4773
...
...
@@ -1212,12 +1212,15 @@ mrb_incremental_gc(mrb_state *mrb)
if
(
is_major_gc
(
gc
))
{
size_t
threshold
=
gc
->
live_after_mark
/
100
*
MAJOR_GC_INC_RATIO
;
if
(
threshold
>
MAJOR_GC_TOOMANY
)
{
gc
->
full
=
FALSE
;
if
(
threshold
<
MAJOR_GC_TOOMANY
)
{
gc
->
majorgc_old_threshold
=
threshold
;
}
else
{
/* too many objects allocated during incremental GC, */
/* instead of increasing threshold, invoke full GC. */
mrb_full_gc
(
mrb
);
threshold
=
gc
->
live_after_mark
/
100
*
MAJOR_GC_INC_RATIO
;
}
gc
->
majorgc_old_threshold
=
threshold
;
gc
->
full
=
FALSE
;
}
else
if
(
is_minor_gc
(
gc
))
{
if
(
gc
->
live
>
gc
->
majorgc_old_threshold
)
{
...
...
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