Project

General

Profile

Actions

Feature #2837

closed

Compile-time constant for HEAP_GROWTH_FACTOR (patch attached)

Added by adgar (Michael Edgar) almost 15 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
[ruby-core:28487]

Description

=begin
The GC currently increases the size at which newly-created heaps by a factor of 1.8 for each heap. Some find it appropriate to modify this value (REE uses a value of 1 instead of 1.8, for example). In the trunk version of this code, that value is hard-coded in as a constant at 1.8 in gc.c:980.

I've included a patch to expose this as a compile-time constant (HEAP_GROW_FACTOR), and also included getters and setters in the style of the patch I submitted in Issue 1047: http://redmine.ruby-lang.org/issues/show/1047 .
=end


Files

grow_factor.patch (2 KB) grow_factor.patch adgar (Michael Edgar), 03/05/2010 05:20 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #8015: [patch] tuneable HEAP_GROWTH_FACTORClosedauthorNari (Narihiro Nakamura)03/05/2013Actions
Actions #1

Updated by nobu (Nobuyoshi Nakada) almost 15 years ago

=begin
Hi,

At Fri, 5 Mar 2010 05:20:36 +0900,
Michael Edgar wrote in [ruby-core:28487]:

I've included a patch to expose this as a compile-time
constant (HEAP_GROW_FACTOR), and also included getters and
setters in the style of the patch I submitted in Issue 1047:
http://redmine.ruby-lang.org/issues/show/1047 .

At least, they must be members of rb_objspace_t, and the
argument ranges should be checked.

--
Nobu Nakada

=end

Actions #2

Updated by adgar (Michael Edgar) almost 15 years ago

=begin

At least, they must be members of rb_objspace_t, and the
argument ranges should be checked.

I considered this, though they are compile-time constants that are being replaced. Pre-patch, they aren't currently in the rb_objspace_t. The malloc_limit accessor affects the currently rb_objspace_t as appropriate, but the HEAP_MIN_SLOTS accessors don't since that value doesn't directly affect existing structures. I can certainly put a heap_min_slots member into rb_objspace_t.

Also, which argument ranges are considered valid? Perhaps a malloc_limit of at least 10K? I don't know how small of a footprint Ruby could fit into that people would like. While most people increase these values beyond their initial defaults, I wouldn't want to set the limit too low.

Thanks!
=end

Actions #3

Updated by znz (Kazuhiro NISHIYAMA) over 14 years ago

  • Target version set to 2.0.0

=begin

=end

Updated by nahi (Hiroshi Nakamura) almost 13 years ago

  • Description updated (diff)
  • Assignee set to authorNari (Narihiro Nakamura)
Actions #5

Updated by shyouhei (Shyouhei Urabe) almost 13 years ago

  • Status changed from Open to Assigned

Updated by authorNari (Narihiro Nakamura) about 12 years ago

  • Target version changed from 2.0.0 to 2.6

Updated by nobu (Nobuyoshi Nakada) almost 12 years ago

This patch contains not only the subject but also the accessors.
It isn't acceptable and you should separate them, I think.

Updated by authorNari (Narihiro Nakamura) almost 12 years ago

  • Status changed from Assigned to Closed

I commited r39746.
We can change HEAP_GROWTH_FACTOR via an enviroment variable now.
So I close this ticket.

Thanks.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0