Tools for memory tracking

A

Adam Beguelin

------=_NextPart_000_0121_01C5C938.E938EA20
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit



Does anyone have suggestions for tools that might help tracking down memory
leaks in ruby programs? I've done a bit of searching around and haven't
found anything.



Cheers,

Adam




------=_NextPart_000_0121_01C5C938.E938EA20--
 
S

sweet_thiruvonam

Hello,
Happy Harmony is the fastest growing matrimonial portal for
Indians.
You can email and IM other members without paying anything on this
site.
The amazing thing is that this site is totally free. Absolutely free.
Cannot believe? Then click on this link to visit and register Happy
Harmony.
http://www.happyharmony.com/?idAff=14
Background check is the new facility they have added now. You can do a
free
background check including age, address, phone numbers, property
owneship
information etc of anybody in the US.

Regards,
Resh
 
R

Robert Klemme

Adam said:
Does anyone have suggestions for tools that might help tracking down
memory leaks in ruby programs? I've done a bit of searching around
and haven't found anything.

I don't know about tools, too. But you can cook yourself something with
ObjectSpace. With this at least you can determine object counts and see
whether some class's counts grow beyond bounds.

Kind regards

robert
 
Å

刘孟江

the follow code is in the mkmf.rb:

*def checking_for(m)
f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim
m = "checking for #{m}... "
message "%s", m
a = r = nil
Logging::postpone do
r = yield
a = r ? "yes\n" : "no\n"
"#{f}#{m}-------------------- #{a}\n"
end
message(a)
Logging::message "--------------------\n\n"
r
end

*what meaning of the '*f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim*'?

pls!
*
*
 
C

Caleb Tennis

Does anyone have suggestions for tools that might help tracking down memory
leaks in ruby programs? I've done a bit of searching around and haven't
found anything.

On Linux you can use Valgrind (valgrind.kde.org).

Are you experiencing the leaks when using external libraries or just core
Ruby?

Caleb
 
D

daz

limux... said:
the follow code is in the mkmf.rb:

*def checking_for(m)
f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim
m = "checking for #{m}... "
message "%s", m
a = r = nil
Logging::postpone do
r = yield
a = r ? "yes\n" : "no\n"
"#{f}#{m}-------------------- #{a}\n"
end
message(a)
Logging::message "--------------------\n\n"
r
end

*what meaning of the '*f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim*'?


def metha
methb
end

def methb
sep; p(( f = caller )) # Execution history (Array)
sep; p(( f = caller[0] )) # Take the most recent entry

# Take the first group from a string match result (else nil) # See [1]
sep; p(( f = caller[0][/in `(.*)'$/, 1] ))

# If there was a match, append ': ' to it
sep; p(( f = caller[0][/in `(.*)'$/, 1] and f << ": " ))

# The rest is a comment
end

def sep; puts('-' * 30) end

metha

##-> ------------------------------
##-> ["C:/TEMP/rbB105.TMP:2:in `metha'", "C:/TEMP/rbB105.TMP:17"]
##-> ------------------------------
##-> "C:/TEMP/rbB105.TMP:2:in `metha'"
##-> ------------------------------
##-> "metha"
##-> ------------------------------
##-> "metha: "

[1] str[regexp, fixnum]
http://www.ruby-doc.org/core/classes/String.html#M001373


daz
 
A

Austin Ziegler

T24gMTAvNS8wNSwgwfXDz72tIDxsaW11eEAxMjYuY29tPiB3cm90ZToKPiAqd2hhdCBtZWFuaW5n
IG9mIHRoZSAnKmYgPSBjYWxsZXJbMF1bL2luIGAoLiopJyQvLCAxXSBhbmQgZiA8PCAiOiAiICNg
IGZvciB2aW0qJz8KClNlZSB0aGUgZG9jdW1lbnRhdGlvbiBvbiBLZXJuZWwjY2FsbGVyCgotYXVz
dGluCi0tCkF1c3RpbiBaaWVnbGVyICogaGFsb3N0YXR1ZUBnbWFpbC5jb20KICAgICAgICAgICAg
ICAgKiBBbHRlcm5hdGU6IGF1c3RpbkBoYWxvc3RhdHVlLmNhCg==
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top