[#23132] [Bug #1357] Fixing variables into specific CPU registers deemed overrated & may disturb compilers' optimizers — Ollivier Robert <redmine@...>
Bug #1357: Fixing variables into specific CPU registers deemed overrated & may disturb compilers' optimizers
[#23154] [Bug #1363] Wrong value for Hash of NaN — Heesob Park <redmine@...>
Bug #1363: Wrong value for Hash of NaN
Hi,
Hi,
Yukihiro Matsumoto wrote:
[#23168] [Bug #1367] flatten(0) is not consistent with flatten(), flatten(1), etc. — Paul Lewis <redmine@...>
Bug #1367: flatten(0) is not consistent with flatten(), flatten(1), etc.
Issue #1367 has been updated by Paul Lewis.
[#23174] [Feature #1371] FTPS Implicit — Daniel Parker <redmine@...>
Feature #1371: FTPS Implicit
[#23193] Regexp Encoding — James Gray <james@...>
I'm trying to document the Encoding Regexp objects receive for the
[#23194] [Feature #1377] Please provide constant File::NOATIME — Johan Walles <redmine@...>
Feature #1377: Please provide constant File::NOATIME
[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Dear Ruby developers and users!
Wolfgang N叩dasi-Donner wrote:
Wolfgang N叩dasi-Donner wrote:
Michael Neumann schrieb:
[#23252] [Bug #1392] Object#extend leaks memory on Ruby 1.9.1 — Muhammad Ali <redmine@...>
Bug #1392: Object#extend leaks memory on Ruby 1.9.1
[#23267] StringIO: RubySpec violation — Hongli Lai <hongli@...99.net>
I ran RubySpec against the 1.8.6-p368 release. It seems that
[#23289] [Bug #1399] Segmentation fault is raised when you use a postgres gem — Marcel Keil <redmine@...>
Bug #1399: Segmentation fault is raised when you use a postgres gem
[#23297] Ruby Oniguruma question — Ralf Junker <ralfjunker@...>
I see that the Ruby source code contains modified and more recent version of the Oniguruma regular expression library.
[#23305] [Bug #1403] Process.daemon should do a double fork to avoid problems with controlling terminals — Gary Wright <redmine@...>
Bug #1403: Process.daemon should do a double fork to avoid problems with controlling terminals
Hi,
[#23311] [Bug #1404] Net::HTTP::Post failing when a post field contains ":" — Ignacio Martín <redmine@...>
Bug #1404: Net::HTTP::Post failing when a post field contains ":"
[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>
Feature #1408: 0.1.to_r not equal to (1/10)
Issue #1408 has been updated by tadayoshi funaba.
Hi,
Hi.
Issue #1408 has been updated by Marc-Andre Lafortune.
Issue #1408 has been updated by Roger Pack.
[#23321] [Bug #1412] 1.8.7-p160 extmk.rb fails when cross compiling — Luis Lavena <redmine@...>
Bug #1412: 1.8.7-p160 extmk.rb fails when cross compiling
[ruby-core:23263] Re: [Bug #1392] Object#extend leaks memory on Ruby 1.9.1
On second thoughts, I still believe there is a leak. I modified the test as
follows:
@extend = ARGV[0]
module BetterHash
def blabla
end
end
unless @extend
class Hash
include BetterHash
end
end
t = Time.now
100.times do #split the allocation process
10000.times do
s = {}
s.extend BetterHash if @extend
end
GC.start # force a gc after each allocation batch
end
after = Time.now - t
puts "done with #{GC.count} gc runs after #{after} seconds"
This way the allocation is done in batches and the GC should be able to free
the objects after each batch.
After the first few batches the vm should have enough free space for any of
the next ones. Not what happens
though as it keeps growing till it reaches like ~18 MB on my machine. (the
include version maxes at 2.8).
If I add a delay between batches I could watch the process as it uses more
memory gradually.
To further prove I added the following code before the end:
@strings = []
10240.times do
@strings << "a"*1024
end
This will alocate around 10MB worth of small strings (1K each). The include
version reports an increase of 10MB in its RAM usage.
The troubling thing is that the extend version also reports a 10MB increase
in its RAM usage (up to ~29) when it has supposedly
more than enough heap space to allocate those small strings.
thoughts?
oldmoe
oldmoe.blogspot.com
On Mon, Apr 20, 2009 at 3:23 PM, Muhammad A. Ali <oldmoe@gmail.com> wrote:
> Hi,
>
> Thanks for the clarification. The strange thing though (which lead me to
> this conclusion) is that 1.8 consistently maintains
>
> the same memory usage for both the include and the extend versions. Could
> this be attributed to the frequency of GC runs?
>
> Regards
>
> oldmoe
> oldmoe.blogspot.com
>
> On Mon, Apr 20, 2009 at 5:43 AM, Yukihiro Matsumoto <matz@ruby-lang.org>wrote:
>
>> Hi,
>>
>> In message "Re: [ruby-core:23252] [Bug #1392] Object#extend leaks memory
>> on Ruby 1.9.1"
>> on Sun, 19 Apr 2009 07:18:18 +0900, Muhammad Ali <
>> redmine@ruby-lang.org> writes:
>> |
>> |Bug #1392: Object#extend leaks memory on Ruby 1.9.1
>> |http://redmine.ruby-lang.org/issues/show/1392
>>
>> |A few bytes are leaked every time Object#extend is called, here is a
>> sample 1.9.1 script
>>
>> It does not leak memory. the version that use #extend allocates
>> internal class-like object for each hash object, so that it allocates
>> lot more objects than #include version, thus requires more heap space
>> to be allocated. The GC does reclaim the unused objects, but it may
>> not be able to return heap space to the underlying OS.
>>
>> To confirm there's no memory leak, replace sleep with
>>
>> GC.start
>> p ObjectSpace.count_objects
>>
>> It prints the number of live objects, e.g.
>>
>> {:TOTAL=>17185, :FREE=>9590, :T_OBJECT=>5, :T_CLASS=>474, :T_MODULE=>20,
>> :T_FLOAT=>6, :T_STRING=>1551, :T_REGEXP=>10, :T_ARRAY=>23, :T_HASH=>3,
>> :T_BIGNUM=>2, :T_FILE=>3, :T_DATA=>28, :T_COMPLEX=>1, :T_NODE=>5451,
>> :T_ICLASS=>18}
>>
>> matz.
>>
>>
>