mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (gc_profile_clear): do rest_sweep() before clearing
profile.current_record. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0805d73f65
commit
c4fe526011
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Aug 27 11:46:31 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* gc.c (gc_profile_clear): do rest_sweep() before clearing
|
||||||
|
profile.current_record.
|
||||||
|
|
||||||
Tue Aug 27 07:35:05 2013 Aaron Patterson <aaron@tenderlovemaking.com>
|
Tue Aug 27 07:35:05 2013 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||||
|
|
||||||
* io.c (io_read_nonblock): support non-blocking reads without raising
|
* io.c (io_read_nonblock): support non-blocking reads without raising
|
||||||
|
|
5
gc.c
5
gc.c
|
@ -5290,6 +5290,11 @@ gc_profile_clear(void)
|
||||||
{
|
{
|
||||||
rb_objspace_t *objspace = &rb_objspace;
|
rb_objspace_t *objspace = &rb_objspace;
|
||||||
|
|
||||||
|
/* This method doesn't change profile.run status.
|
||||||
|
* While lazy sweeping, it is possible to touch zero-cleared profile.current_record.
|
||||||
|
*/
|
||||||
|
gc_rest_sweep(objspace);
|
||||||
|
|
||||||
if (GC_PROFILE_RECORD_DEFAULT_SIZE * 2 < objspace->profile.size) {
|
if (GC_PROFILE_RECORD_DEFAULT_SIZE * 2 < objspace->profile.size) {
|
||||||
objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE * 2;
|
objspace->profile.size = GC_PROFILE_RECORD_DEFAULT_SIZE * 2;
|
||||||
objspace->profile.records = realloc(objspace->profile.records, sizeof(gc_profile_record) * objspace->profile.size);
|
objspace->profile.records = realloc(objspace->profile.records, sizeof(gc_profile_record) * objspace->profile.size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue