Tools for memory tracking

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

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

Adam Beguelin wrote:

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

If you are using Windows there is Ruby Memory Validator at http://www.softwareverify.com

No Web page to describe it, but you can join the beta here:

http://www.softwareverify.com/beta.php?product=RMVB000

Stephen

···

In message <20051005061118.F087834128@beryllium.ruby-lang.org>, Adam Beguelin <adam@truveo.com> writes

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.

--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting

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

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

Caleb

···

On Wednesday 05 October 2005 01:11 am, Adam Beguelin wrote:

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.

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!

···

*

limux... wrote:

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]
    class String - RDoc Documentation

daz

See the documentation on Kernel#caller

-austin

···

On 10/5/05, 刘孟江 <limux@126.com> wrote:

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

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca