closer changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
enebo has quit [Quit: enebo]
enebo has joined #ruby-core
charliesome has joined #ruby-core
enebo has quit [Quit: enebo]
bffff_ has joined #ruby-core
<znz_jp> biff: [ruby-changes:34773] hsbt:r46856 (trunk): * lib/fileutils.rb: added missing options of FileUtils.touch by @Domon. - http://mla.n-z.jp/?ruby-changes=34773
travis-ci has joined #ruby-core
<travis-ci> [travis-ci] The build was fixed. by @hsbt: See http://travis-ci.org/ruby/ruby/builds/30227667
travis-ci has left #ruby-core [#ruby-core]
<znz_jp> biff: [ruby-changes:34774] nobu:r46857 (trunk): configure.in: with-destdir - http://mla.n-z.jp/?ruby-changes=34774
Philpax has quit [Read error: Connection reset by peer]
<znz_jp> biff: [ruby-changes:34775] nobu:r46858 (trunk): vm_core.h: redefined_flag in rb_vm_t - http://mla.n-z.jp/?ruby-changes=34775
travis-ci has joined #ruby-core
travis-ci has left #ruby-core [#ruby-core]
<travis-ci> [travis-ci] The build was broken. by @nobu: See http://travis-ci.org/ruby/ruby/builds/30228893
<znz_jp> biff: [ruby-changes:34776] nobu:r46859 (trunk): enum.c: optimize any? object allocations for Array and Hash - http://mla.n-z.jp/?ruby-changes=34776
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<znz_jp> biff: [ruby-changes:34777] nobu:r46860 (trunk): ChangeLog: fix GH reference - http://mla.n-z.jp/?ruby-changes=34777
travis-ci has joined #ruby-core
travis-ci has left #ruby-core [#ruby-core]
<travis-ci> [travis-ci] The build was fixed. by @nobu: See http://travis-ci.org/ruby/ruby/builds/30230025
Philpax has joined #ruby-core
_ht has joined #ruby-core
charliesome has joined #ruby-core
Philpax has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<znz_jp> biff: [ruby-changes:34778] hsbt:r46861 (trunk): * test/matrix/test_matrix.rb: Add tests for Matrix class. - http://mla.n-z.jp/?ruby-changes=34778
<znz_jp> biff: [ruby-changes:34779] marcandRe: r46862 (trunk): * lib/matrix.rb: Avoid using `and`. - http://mla.n-z.jp/?ruby-changes=34779
<znz_jp> biff: [ruby-changes:34780] marcandRe: r46863 (trunk): * lib/matrix/eigenvalue_decomposition: Style fix - http://mla.n-z.jp/?ruby-changes=34780
travis-ci has joined #ruby-core
travis-ci has left #ruby-core [#ruby-core]
<travis-ci> [travis-ci] The build was fixed. by @marcandre: See http://travis-ci.org/ruby/ruby/builds/30253539
<znz_jp> biff: [ruby-changes:34781] suke:r46864 (trunk): * ext/win32ole/win32ole.c (folevariant_initialize): remove unnecessary - http://mla.n-z.jp/?ruby-changes=34781
nagachika has joined #ruby-core
nagachika has quit [Remote host closed the connection]
nagachika has joined #ruby-core
nagachika has quit [Remote host closed the connection]
nagachika has joined #ruby-core
<znz_jp> biff: [ruby-changes:34782] nobu:r46865 (trunk): revert r46859 and r46860 - http://mla.n-z.jp/?ruby-changes=34782
<znz_jp> biff: [ruby-changes:34783] nobu:r46866 (trunk): optimized any? methods - http://mla.n-z.jp/?ruby-changes=34783
<znz_jp> biff: [ruby-changes:34784] suke:r46867 (trunk): * ext/win32ole/win32ole.c (folevariant_initialize): WIN32OLE_VARIANT - http://mla.n-z.jp/?ruby-changes=34784
Philpax has joined #ruby-core
Philpax has quit [Quit: Leaving]
charliesome has joined #ruby-core
shinnya has joined #ruby-core
<znz_jp> biff: [ruby-changes:34785] nobu:r46868 (trunk): array.c: array may be modified in the block - http://mla.n-z.jp/?ruby-changes=34785
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-core
charliesome has quit [Ping timeout: 240 seconds]
enebo has joined #ruby-core
travis-ci has joined #ruby-core
<travis-ci> [travis-ci] The build was broken. by @nobu: See http://travis-ci.org/ruby/ruby/builds/30273644
travis-ci has left #ruby-core [#ruby-core]
charliesome has joined #ruby-core
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<znz_jp> biff: [ruby-changes:34786] nagachika:r46869 (ruby_2_1): merge revision(s) r46344: [Backport #9902] - http://mla.n-z.jp/?ruby-changes=34786
nurse has quit [Ping timeout: 260 seconds]
nurse has joined #ruby-core
nagachika has quit [Remote host closed the connection]
nagachika has joined #ruby-core
nagachika has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby-core
charliesome has quit [Client Quit]
kosaki6 has joined #ruby-core
mpapis has quit [*.net *.split]
charliesome has joined #ruby-core
mpapis has joined #ruby-core
luiz_lha has joined #ruby-core
charliesome has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby-core
charliesome has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby-core
charliesome has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby-core
drbrain has quit [*.net *.split]
enebo has quit [*.net *.split]
drbrain has joined #ruby-core
enebo has joined #ruby-core
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<headius> anyone around that could help me understand part of MRI?
<headius> _ko1 or nokada_ perhaps
<headius> basic question...reading through IO#read code, it seems like it's allocating a string using the size requested
<headius> i.e. read(1_000_000_000) allocates a string of 1GB
<headius> either that's not happening and I'm reading it wrong, or it is happening but I can't see it using OS tools
<drbrain> headius: it sure looks like it allocates a 1GB string to me
<drbrain> headius: and I see in Activity Monitor that ruby is using 1GB of memory
<drbrain> allocated in rb_str_modify_expand called from io_setstrbuf
<znz_jp> biff: [ruby-changes:34787] suke:r46870 (trunk): * refactoring - http://mla.n-z.jp/?ruby-changes=34787
<znz_jp> biff: [ruby-changes:34788] svn:r46871 (trunk): * 2014-07-19 - http://mla.n-z.jp/?ruby-changes=34788
<headius> drbrain: where's the 1GB in activity monitor?
<headius> it's not showing under any of the memory columns I tried
<headius> hmmm
<drbrain> I ran uby -e 'open "/dev/zero" do |io| io.read 1_000_000_000 end; sleep'
<drbrain> +r, of course
<drbrain> and it showed in the Memory column of Activity Monitor
<drbrain> I was trying to set a breakpoint before the read(2)
<headius> ok, I should clarify...I'm reading a fixed-length file
<drbrain> but I'm no good at debuggers
<headius> the logic as written *seems* like it should still eagerly allocate a 1GB buffer but I can't see it
<drbrain> according to what I'm reading it shouldn't make a difference
<headius> try a small file for me please
<headius> does MRI have something that would re-pack a string down to actual content?
<drbrain> oh, that's probably due to rb_io_set_length right after io_fread
<headius> I looked at that but it doesn't seem to do anything to the buffer
<drbrain> you're right
<drbrain> I have a call in a few minutes before I can look at this more
<headius> np
<drbrain> looks like I need to rebuild ruby
<headius> drbrain: I've got enebo looking too
<headius> one of those days where I feel like I'm blind to some line of code that would explain this
<drbrain> headius: ok
Philpax has joined #ruby-core
<drbrain> I broke between the REALLOC_N and writing to the string
<drbrain> so it would be the same as a small file
<headius> ok
<drbrain> if I look in Activity Monitor it shows:
<drbrain> Real Memory Size 20.6 MB
<drbrain> and VM Size: 3.28 GB
<drbrain> but if I run vmmap against the PID I get:
<drbrain> I'll gist it
<headius> ok
<drbrain> so I think this is malloc() tricks
<enebo> aha
<enebo> It says reserved but does actually do it
<enebo> So if you start writing to that pointer it deals with that and grows it out?
<drbrain> yes
<headius> grrrific
<enebo> cool
<headius> I figured it would end up being that
<enebo> headius: now emulate that
<drbrain> if I put a sleep after the read and check Activity Monitor its using about 1GB
<headius> yeah right
_ht has quit [Remote host closed the connection]
<headius> I may have to rethink the ported logic
<enebo> back to #jruby!
<headius> drbrain: that's the gist from reading a small file with read(1G)?
<drbrain> I think line 165 of the gist is most important
shinnya has joined #ruby-core
<drbrain> I think it would be the same because I haven't hit anything IO related for the breakpoint
<headius> yeah
<drbrain> well, rb_io_check_closed
<headius> well shuckers
<headius> I can't do that sort of trick because all memory comes from the heap in JVM
<drbrain> btw, 958MB is 1004535808 bytes
<drbrain> so the BYTES ALLOCATED matches
<headius> this is interesting though...a really large string gets no more weight in GC than a small one because they're allocating the store off heap
<headius> I suppose the GC could be looking into the string buffer though and doing some weighting?
<headius> yeah ok
<drbrain> it may vary on different malloc() implementations
<enebo> drbrain: thanks for the info. This is pretty fascinating. I am still happy I don’t write C anymore but this is cool :)
<drbrain> cool
<drbrain> I confirmed that a small file has the same behavior
<drbrain> enebo: I think that for large allocations malloc() uses mmap() so the pages are only reserved as address space
<enebo> yeah
<drbrain> and the address map shows the MALLOC_LARGE adjoining regions hold 1000001536 bytes
<headius> yeah, fair enough
<enebo> So MRI did not invent their own alloca and they are using Apple’s default stuff or is this much lower?
<headius> I couldn't find anything custom in MRI around this
<drbrain> if you follow the REALLOC_N macro down it ends up at realloc()
<headius> I think it's just malloc/realloc magic
<drbrain> there's some hooks into the GC to allow the GC to run if that is needed
<drbrain> but ultimately it uses malloc()
enebo has quit [Quit: enebo]
<headius> ok
luiz_ has joined #ruby-core
luiz_ is now known as Guest96311
luiz_lha has quit [Ping timeout: 250 seconds]
Guest96311 has quit [Max SendQ exceeded]
luiz_lha has joined #ruby-core
luiz_lha has quit [Max SendQ exceeded]
luiz_lha has joined #ruby-core
luiz_lha has quit [Max SendQ exceeded]
luiz_lha has joined #ruby-core
luiz_lha has quit [Max SendQ exceeded]
luiz_lha has joined #ruby-core
luiz_lha has quit [Max SendQ exceeded]
luiz_lha has joined #ruby-core
hsbt is now known as hsbt_away
luiz_lha has quit [Max SendQ exceeded]
luiz_lha has joined #ruby-core
luiz_lha has quit [Max SendQ exceeded]