Forum: Ruby-core [Open] TRY_WITH_GC with ruby_gc_stress

1a89a8ff89c39148448a228115925b29?d=identicon&s=25 unknown (Guest)
on 2014-04-21 17:24
(Received via mailing list)
Issue #9761 has been updated by _ wanabe.

File xrealloc-with-gc_stress.patch added
Status changed from Feedback to Open

Nobuyoshi Nakada wrote:
> Seems `objspace_malloc_increase()` already runs GC after `xmalloc` and `xcalloc`
if `ruby_gc_stress` is set.
> You may want it to run after `xrealloc` too?
> Or to run full marking?

Sorry for my poor code reading...
It is enough to add a case of `xrealloc` for my concern, reproducing
#9657.

Anyone can close/reject this ticket if you think this is far from the
original proposal.

----------------------------------------
Feature #9761: TRY_WITH_GC with ruby_gc_stress
https://bugs.ruby-lang.org/issues/9761#change-46277

* Author: _ wanabe
* Status: Open
* Priority: Normal
* Assignee:
* Category: core
* Target version:
----------------------------------------
I hope `TRY_WITH_GC()` may use `ruby_gc_stress` value.

Currently, `ruby_gc_stress` doesn't affect simple
`xmalloc()`/`xrealloc()`/`xcalloc()`.
It is usefull to make these functions under gc-stress.
For example, #9657 is difficult to reproduce on trunk because there is
not object creation but memory allocation after `BigDecimal_new()`.

---Files--------------------------------
try_with_gc-with-gc_stress.patch (691 Bytes)
xrealloc-with-gc_stress.patch (456 Bytes)
This topic is locked and can not be replied to.