Skip to content

Commit 6ebf4fa

Browse files
committed
revert r41577 because it causes memory error on mswin CI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 9d70118 commit 6ebf4fa

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

ChangeLog

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ Tue Jun 25 00:10:54 2013 Zachary Scott <[email protected]>
3333
* win32/README.win32: grammar typo by @blankenshipz [Fix GH-334]
3434
https://github.com/ruby/ruby/pull/334
3535

36-
Sun Jun 23 00:09:12 2013 Masaya Tarui <[email protected]>
37-
38-
* gc.c: Fixup around GC by MALLOC.
39-
Add allocate size to malloc_increase before GC
40-
for updating limit in after_gc_sweep.
41-
Reset malloc_increase into garbage_collect()
42-
for preventing GC again soon.
43-
4436
Sun Jun 23 00:03:18 2013 Charlie Somerville <[email protected]>
4537

4638
* ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead

gc.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ typedef struct rb_objspace {
209209
struct {
210210
size_t limit;
211211
size_t increase;
212-
size_t increase2;
213212
#if CALC_EXACT_MALLOC_SIZE
214213
size_t allocated_size;
215214
size_t allocations;
@@ -272,7 +271,6 @@ int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
272271
#endif
273272
#define malloc_limit objspace->malloc_params.limit
274273
#define malloc_increase objspace->malloc_params.increase
275-
#define malloc_increase2 objspace->malloc_params.increase2
276274
#define heaps objspace->heap.ptr
277275
#define heaps_length objspace->heap.length
278276
#define heaps_used objspace->heap.used
@@ -1978,8 +1976,6 @@ before_gc_sweep(rb_objspace_t *objspace)
19781976
objspace->heap.free_num = 0;
19791977
objspace->heap.free_slots = NULL;
19801978

1981-
malloc_increase2 += ATOMIC_SIZE_EXCHANGE(malloc_increase,0);
1982-
19831979
/* sweep unlinked method entries */
19841980
if (GET_VM()->unlinked_method_entry_list) {
19851981
rb_sweep_method_entry(GET_VM());
@@ -1998,9 +1994,6 @@ after_gc_sweep(rb_objspace_t *objspace)
19981994
}
19991995

20001996
inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0);
2001-
inc += malloc_increase2;
2002-
malloc_increase2 = 0;
2003-
20041997
if (inc > malloc_limit) {
20051998
malloc_limit +=
20061999
(size_t)((inc - malloc_limit) * (double)objspace->heap.marked_num / (heaps_used * HEAP_OBJ_LIMIT));
@@ -3486,9 +3479,8 @@ vm_malloc_prepare(rb_objspace_t *objspace, size_t size)
34863479
size += sizeof(size_t);
34873480
#endif
34883481

3489-
ATOMIC_SIZE_ADD(malloc_increase, size);
34903482
if ((ruby_gc_stress && !ruby_disable_gc_stress) ||
3491-
malloc_increase > malloc_limit) {
3483+
(malloc_increase+size) > malloc_limit) {
34923484
garbage_collect_with_gvl(objspace);
34933485
}
34943486

@@ -3498,6 +3490,8 @@ vm_malloc_prepare(rb_objspace_t *objspace, size_t size)
34983490
static inline void *
34993491
vm_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
35003492
{
3493+
ATOMIC_SIZE_ADD(malloc_increase, size);
3494+
35013495
#if CALC_EXACT_MALLOC_SIZE
35023496
ATOMIC_SIZE_ADD(objspace->malloc_params.allocated_size, size);
35033497
ATOMIC_SIZE_INC(objspace->malloc_params.allocations);
@@ -4083,7 +4077,7 @@ gc_prof_set_malloc_info(rb_objspace_t *objspace)
40834077
if (objspace->profile.run) {
40844078
gc_profile_record *record = &objspace->profile.record[objspace->profile.count];
40854079
if (record) {
4086-
record->allocate_increase = malloc_increase + malloc_increase2;
4080+
record->allocate_increase = malloc_increase;
40874081
record->allocate_limit = malloc_limit;
40884082
}
40894083
}

version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#define RUBY_VERSION "2.0.0"
2-
#define RUBY_RELEASE_DATE "2013-06-26"
3-
#define RUBY_PATCHLEVEL 244
2+
#define RUBY_RELEASE_DATE "2013-06-27"
3+
#define RUBY_PATCHLEVEL 245
44

55
#define RUBY_RELEASE_YEAR 2013
66
#define RUBY_RELEASE_MONTH 6
7-
#define RUBY_RELEASE_DAY 26
7+
#define RUBY_RELEASE_DAY 27
88

99
#include "ruby/version.h"
1010

0 commit comments

Comments
 (0)