[#19684] Re: Odd TypeError in inject (1.9.1 preview 1) — Brian Candler <B.Candler@...>
[Apologies for broken threading, it shouldn't happen again]
On Tue, Nov 04, 2008 at 03:41:27PM +0900, Yukihiro Matsumoto wrote:
[#19710] build error with "nightly snapshot" — "Roger Pack" <rogerpack2005@...>
With mingw and the current 1.9 "nightly snapshot" I currently get
Hi,
> I think we've fixed this issue. Try again tomorrow.
Hi,
> It is curious. How are topdir extout defined in the Makefile?
[#19721] [Bug #719] yaml not precise on some strings — a b <redmine@...>
Bug #719: yaml not precise on some strings
[#19728] [Bug #721] select in windows accepts too many fd's — Roger Pack <redmine@...>
Bug #721: select in windows accepts too many fd's
[#19731] use of require thread safety — "Roger Pack" <rogerpack2005@...>
I'm sure this has been discussed before, but...should there be
Hi,
Nobuyoshi Nakada wrote:
Hi,
In article <E1LSOzO-0000HT-Q9@x61.netlab.jp>,
> While a thread is requiring a given file, another thread which
> Currently with 1.8.7 (for me) the secondmost thread continues
Roger Pack wrote:
Charles Oliver Nutter wrote:
Gary Wright wrote:
On Mon, Dec 22, 2008 at 03:05:07AM +0900, Charles Oliver Nutter wrote:
Paul Brannan wrote:
On Tue, Dec 23, 2008 at 02:14:52AM +0900, Charles Oliver Nutter wrote:
2008/12/23 Paul Brannan <pbrannan@atdesk.com>:
On Tue, Dec 23, 2008 at 11:32:00PM +0900, Robert Klemme wrote:
Paul Brannan wrote:
On Tue, Nov 11, 2008 at 10:51:45AM +0900, Nobuyoshi Nakada wrote:
Paul Brannan wrote:
On Wed, Nov 12, 2008 at 04:06:00AM +0900, Charles Oliver Nutter wrote:
Paul Brannan wrote:
Hi,
Yukihiro Matsumoto wrote:
Hi,
Yukihiro Matsumoto wrote:
[#19759] Proposal: Method#get_args — "Yehuda Katz" <wycats@...>
I'd like to propose a way to introspect into the arguments of a method
I am late to this discussion, but I am a bit concerned about the
On Thu, Dec 4, 2008 at 08:01, Paul McMahon <paul.mcmahon@ubit.com> wrote:
On Thu, Dec 04, 2008 at 10:02:29PM +0900, Daniel Luz wrote:
On Sun, Nov 9, 2008 at 5:46 PM, Yehuda Katz <wycats@gmail.com> wrote:
On Mon, Nov 10, 2008 at 5:32 AM, Austin Ziegler <halostatue@gmail.com>wrote:
On Mon, Nov 10, 2008 at 4:26 AM, Meinrad Recheis
On Mon, Nov 10, 2008 at 09:50:32PM +0900, Austin Ziegler wrote:
Hi,
Hi,
On Wed, Nov 12, 2008 at 03:58:48AM +0900, Nobuyoshi Nakada wrote:
> I'd like to propose a way to introspect into the arguments of a method
The only question I have is why would one want to know the names of
On Nov 10, 7:18=A0pm, "Roger Pack" <rogerpack2...@gmail.com> wrote:
> One could use it for documenting external interfaces. Eg. A command
On Mon, Nov 10, 2008 at 8:11 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
> Is RubyVM::InstructionSequence considered portable?
On Mon, Nov 10, 2008 at 11:05 PM, Roger Pack <rogerpack2005@gmail.com> wrote:
Allow me to throw in my ~.116892074 DKK;
Mikael H淡ilund wrote:
On Wed, Nov 12, 2008 at 04:48:03AM +0900, Dave Thomas wrote:
On Wed, Nov 12, 2008 at 06:01:40PM +0900, Brian Candler wrote:
On Wed, Nov 12, 2008 at 06:01:40PM +0900, Brian Candler wrote:
Paul Brannan wrote:
On Thu, Nov 13, 2008 at 02:06:15AM +0900, Charles Oliver Nutter wrote:
Paul Brannan wrote:
> -----Original Message-----
On Thu, Nov 13, 2008 at 04:33:07AM +0900, Jim Deville wrote:
Jim Weirich wrote:
On Nov 12, 2008, at 4:12 PM, Charles Oliver Nutter wrote:
On Thu, Nov 13, 2008 at 07:02:25AM +0900, Jim Weirich wrote:
Hi,
Nobuyoshi Nakada wrote:
On Fri, Nov 14, 2008 at 03:30:44PM +0900, Charles Oliver Nutter wrote:
We need the defaults to handle out-of-order defaults:
On Fri, Nov 14, 2008 at 06:32:58PM +0900, Yehuda Katz wrote:
You were on the mark when you said it was a poor man's named args.
On Wed, Nov 12, 2008 at 12:06 PM, Charles Oliver Nutter
I am strongly in favor of this proposal. Getting something simple that
Hi,
Hi,
Hi,
What values does simple_default handle? Assuming it covers the simple cases
[#19760] ThreadGroup: << and Enumerable for POLS — paddor <paddor@...>
Hey
[#19763] [Bug #738] Repeated calls to popen cause thread problems — Michal Suchanek <redmine@...>
Bug #738: Repeated calls to popen cause thread problems
[#19784] Status of copy-on-write friendly garbage collector — Hongli Lai <hongli@...99.net>
Hi.
Hi.
Narihiro,
Hi,
Yukihiro Matsumoto wrote:
Hi,
I've contacted to the author, Dr. Ugawa, and he kindly sent me an
[#19819] Re: Definition of "Support levels", 1.9.1 supported platforms and recruitment for platform maintainers — Dae San Hwang <lists@...>
> The tasks which a maintainer should do are:
Hi,
[#19845] [Bug #743] Socket.gethostbyname returns odd values — Roger Pack <redmine@...>
Bug #743: Socket.gethostbyname returns odd values
Issue #743 has been updated by Alan Johnson.
Hi,
[#19846] [Bug #744] memory leak in callcc? — Roger Pack <redmine@...>
Bug #744: memory leak in callcc?
Issue #744 has been updated by Roger Pack.
Hi,
On Wednesday 21 of January 2009 10:21:19 Brent Roman wrote:
>> I've tried that myself but it didn't work very well
On Saturday 14 of February 2009 08:17:22 Roger Pack wrote:
> The moon has shifted phases since January :) Seriously though, I've also found
Hi,
> I pushed an update to the patches onto github last night that seems to
I am continuing to see random segfaults on x86_64, especially with god
2009/1/22 Brent Roman <brent@mbari.org>:
I have applied the MBARI patches to 1.8.6 p287. About half the hunks had to
On Thu, Jan 22, 2009 at 4:09 PM, Brent Roman <brent@mbari.org> wrote:
On Thursday 22 of January 2009 12:55:08 Brent Roman wrote:
I was attempting to backport your MBARI patches to 1.8.6 p287, which is what
Issue #744 has been updated by Roger Pack.
At 12:54 08/11/17, Brent Roman wrote:
A common technique is to allocate a reasonably sized array (256-bytes)
> I implemented a scheme for recording the maximum depth of the C stack in
First thanks for doing all that hard work. I'm sure it's not pleasant
Seems to overall be a tidge slower for "micro" stuff--5 or 10%.
> You ran this benchmark suite, correct?
Hmm interesting.
Brent,
Brent Roman wrote:
Brent Roman wrote:
On OSX -fomit-frame-pointer is turned off if you use -O2, or other
On Mon, 22 Dec 2008 20:59:05 +1100, Brent Roman <brent@mbari.org> wrote:
Hi,
The problem can be demonstrated with a very simple program (attached), and
> What I did come up with was not ugly at all. Factor the unwieldy switch
On Tue, Dec 02, 2008 at 04:47:46AM +0900, Brent Roman wrote:
At 06:56 08/12/02, Brian Candler wrote:
On Tue, Dec 02, 2008 at 10:21:05AM +0900, Martin Duerst wrote:
Hi,
> After a couple weeks of long nights and false starts, I feel I may have come
[#19921] flay is so awesome! — Ryan Davis <ryand-ruby@...>
I just found a typo in code in tk via flay! RAD!! This exists in trunk
2008/11/13 Ryan Davis <ryand-ruby@zenspider.com>:
[#19938] Fibers in 1.8 — "Aman Gupta" <rubytalk@...1.net>
Are there any plans to backport Fiber to ruby 1.8?
Hi,
> Fiber in 1.9 equals to Thread of 1.8.
On Wed, Nov 19, 2008 at 17:41, Aman Gupta <rubytalk@tmm1.net> wrote:
Brian Mitchell wrote:
On Wed, Nov 19, 2008 at 20:34, Urabe Shyouhei <shyouhei@ruby-lang.org> wrote:
[#19962] any ideas on why quoted parameters fail in mingw? — "Roger Pack" <rogerpack2005@...>
QW55Ym9keSBoYXZlIGFueSB0aG91Z2h0cyB3aHkKCmM6XGRldj5ydWJ5IC1lICIgXCIzXCIgIgot
T24gU3VuLCBOb3YgMTYsIDIwMDggYXQgMjo1OCBBTSwgUm9nZXIgUGFjayA8cm9nZXJwYWNrMjAw
SW50ZXJlc3RpbmcuCgpTby4uLm9mIG15IDMgd2luZG93cyBtYWNoaW5lcywgMiBpdCBmYWlscyBb
On Mon, Nov 17, 2008 at 11:10 AM, Roger Pack <rogerpack2005@gmail.com> wrote:
On Mon, Nov 17, 2008 at 7:35 AM, Luis Lavena <luislavena@gmail.com> wrote:
[#19965] ruby "[BUG] " and backtrace of native function call - addr2line - useless info — "=?ISO-8859-2?Q?Rados=B3aw_Bu=B3at?=" <radek.bulat@...>
SSBhdHRlbXB0IHRvIHVzZSBydWJ5MS45IGZyb20gdHJ1bmsgdG8gaGF2ZSBmdW4gd2l0aCBpdCBv
Rados梶w Buウat wrote:
[#19971] NULL pointer emerging from empty regexp match!? — Jens Wille <jens.wille@...>
hi!
[#19996] [BUG?] rdoc/ri on solaris 8 (i386 vs sparc) — Ben Walton <bwalton@...>
Hi All,
[#20008] [Bug #766] 'Not enough space' error on windows — Ittay Dror <redmine@...>
Bug #766: 'Not enough space' error on windows
[#20039] printing more output on unrescued exceptions — "Roger Pack" <rogerpack2005@...>
I have been contemplating creating a patch which would make the output
[#20046] ruby19 13% slower running rexml benchmark than ruby 1.8.6 p114 — Stephen Bannasch <stephen.bannasch@...>
I just added ruby 1.9 (svn rev 20317) to a simple xml processing
[#20047] 1.9 method argument binding question — "David A. Black" <dblack@...>
Hi --
[#20048] Unexpected Performance of Symbol Construction — Kurt Stephens <kurt@...>
http://kurtstephens.com/node/72
[#20071] Is missing documentation considered a bug? — Florian Gilcher <flo@...>
Hi,
[#20079] Again: Questions about Fiber behaviour — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Hi!
[#20091] [Bug #796] dynamic constant assignment — Francois Proulx <redmine@...>
Bug #796: dynamic constant assignment
Hi,
> -----Original Message-----
[#20092] [Bug #797] bug or feature: local method ? — Francois Proulx <redmine@...>
Bug #797: bug or feature: local method ?
Hi,
Hi,
Yukihiro Matsumoto wrote:
On Thu, Nov 27, 2008 at 03:32:18AM +0900, Francoys wrote:
[#20125] Playing with String#bytes — Emiel van de Laar <emiel@...>
Hello ruby-core,
[#20129] Ruby class variable access from C — Christopher Thompson <cthompson@...>
I'm probably missing something trivial, but given the following Ruby code:
[#20161] \Z? in regular expression in 1.9.1 — Michael Klishin <michael.s.klishin@...>
I noticed that the following reg exp causes syntax error in 1.9.1 (I
T24gU2F0LCBOb3YgMjksIDIwMDggYXQgMTI6MTQgQU0sIE1pY2hhZWwgS2xpc2hpbgo8bWljaGFl
Hi,
Hi --
[ruby-core:20149] Promising C coding techniques to reduce MRI's memory use
After a couple weeks of long nights and false starts, I feel I may have come
up with
a fix for a large class of Ruby memory leak. The basic technique is a
refinement of the
one Kurt Stephens suggested. It not only eliminates the leaks in this one
liner:
loop {@x=callcc{|c|c}}
but also in our multi-threaded robotics application. Our Ruby process used
to grow
to 20+ MB during a day long run. The same run now stays smaller than 10MB.
On an embedded ARM Linux machine with only 32MB of DRAM, this is a great
result!
The central problem is that gcc (and other compilers) tend to create
sparse stack frames such that, when a new frame is pushed onto the stack, it
does not
completely overwrite the one that had been previously stored there. The new
frame gets
activated with old VALUE pointers preserved inside its holes. These become
"live" again
as far as any conservative garbage collector is concerned. And, viola, a
leak is born!
I implemented a scheme for recording the maximum depth of the C stack in
xmalloc and during garbage collection itself. However, I realized that
there was no point in clearing the stack when it is near its maximum depth.
Instead, stack clearing is deferred until CHECK_INTS, as this tends to
happen
between evaluation of nodes, when the stack is likely to be shallower.
At this point
a tight loop quickly zeros the region between the current top of stack, as
returned by alloca(0), and the maximum recorded stack extent. It also
updates
the stack extent so no memory is cleared repeatedly if the stack contracts
further.
This paper discusses this and similar techniques:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/papers/pldi93.ps.Z
Another related issue is that the style of rb_eval() in eval.c in the
1.8 and 1.6 series causes gcc to emit a especially large and sparse stack
frames.
Consider that gcc allocates two pair of stack slots for r and l in
constructs like this:
switch (nd_type(node)) {
/* nodes for speed-up(literal match) */
case NODE_MATCH2:
{
VALUE l = rb_eval(self,node->nd_recv);
VALUE r = rb_eval(self,node->nd_value);
result = rb_reg_match(l, r);
}
break;
/* nodes for speed-up(literal match) */
case NODE_MATCH3:
{
VALUE r = rb_eval(self,node->nd_recv);
VALUE l = rb_eval(self,node->nd_value);
....
By the time the compiler's optimizer is allocating stack frame slots, all
the block structure
of the original code has been lost in various transformations.
As a result, each rb_eval() call ends up pushing about 4k bytes onto the C
stack,
of which less than 20% is even initialized. This means that:
1) There is a high probability that old VALUEs from previous frames
will be resurrected as the stack grows,
2) The GC must scan a sparse, large stack and mark the many dead object
pointers it contains.
3) callcc and thread context switches must copy needlessly large stacks
4) recursive Ruby programs run out of stack space much earlier than than
they might otherwise.
When I simply re-factored rb_eval() such that it calls a (non-inline)
function
for each node type it encounters, the total observed C stack size for my
application
was reduced by more than two thirds. Not surprisingly, threading and
continuation
micro benchmarks and run about 3 - 4 times faster. However, I expect that
benchmarks that
operate repeatedly on a few large, long lived objects will run slower.
Keep in mind that these techniques should improve the performance of *any*
garbage
collector that scans the unstructured C stack for valid object pointers. It
may
even be relevant for the 1.9 series Ruby, but I'll leave that for those more
qualified to determine.
Today, this is implemented only in my heavily patched version of Ruby 1.6.8.
In the short term, if there's interest,
I can quickly post my hacked 1.6.8 Ruby to an FTP site for others to test.
Longer term,
The stack clearing could be supplied as a small patch to the 1.8 series,
however the
refactoring of rb_eval() is probably too large to be attached to an email
message
on this list. I will take the time to produce these patches only if at
least a few people
commit to testing them, reporting detailed results and suggestions for
improvement here.
- brent
--
View this message in context: http://www.nabble.com/-ruby-core%3A19846---Bug--744--memory-leak-in-callcc--tp20447794p20731668.html
Sent from the ruby-core mailing list archive at Nabble.com.