Tools for memory tracking

Discussion in 'Ruby' started by Adam Beguelin, Oct 5, 2005.

  1. ------=_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--
    Adam Beguelin, Oct 5, 2005
    #1
    1. Advertising

  2. Adam Beguelin

    Guest

    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
    , Oct 5, 2005
    #2
    1. Advertising

  3. 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
    Robert Klemme, Oct 5, 2005
    #3
  4. In message <-lang.org>, Adam
    Beguelin <> 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.


    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
    --
    Stephen Kellett
    Object Media Limited http://www.objmedia.demon.co.uk/software.html
    Computer Consultancy, Software Development
    Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
    Stephen Kellett, Oct 5, 2005
    #4
  5. caller

    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!
    *
    *
    刘孟江, Oct 5, 2005
    #5
  6. Adam Beguelin

    Caleb Tennis Guest

    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.


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

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

    Caleb
    Caleb Tennis, Oct 5, 2005
    #6
  7. Adam Beguelin

    daz Guest

    Re: caller

    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]
    http://www.ruby-doc.org/core/classes/String.html#M001373


    daz
    daz, Oct 5, 2005
    #7
  8. Re: caller

    T24gMTAvNS8wNSwgwfXDz72tIDxsaW11eEAxMjYuY29tPiB3cm90ZToKPiAqd2hhdCBtZWFuaW5n
    IG9mIHRoZSAnKmYgPSBjYWxsZXJbMF1bL2luIGAoLiopJyQvLCAxXSBhbmQgZiA8PCAiOiAiICNg
    IGZvciB2aW0qJz8KClNlZSB0aGUgZG9jdW1lbnRhdGlvbiBvbiBLZXJuZWwjY2FsbGVyCgotYXVz
    dGluCi0tCkF1c3RpbiBaaWVnbGVyICogaGFsb3N0YXR1ZUBnbWFpbC5jb20KICAgICAgICAgICAg
    ICAgKiBBbHRlcm5hdGU6IGF1c3RpbkBoYWxvc3RhdHVlLmNhCg==
    Austin Ziegler, Oct 5, 2005
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    606
    Namratha Shah \(Nasha\)
    Nov 23, 2004
  2. Chris
    Replies:
    4
    Views:
    499
    Thell
    Nov 8, 2005
  3. Replies:
    1
    Views:
    340
  4. Namratha Shah \(Nasha\)

    Article : Security Tools Part -- 2 (.Net FrameWork Tools Series)

    Namratha Shah \(Nasha\), Nov 23, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    205
    Namratha Shah \(Nasha\)
    Nov 23, 2004
  5. Namratha Shah \(Nasha\)

    Article : Security Tools Part -- 2 (.Net FrameWork Tools Series)

    Namratha Shah \(Nasha\), Nov 23, 2004, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    197
    Namratha Shah \(Nasha\)
    Nov 23, 2004
Loading...

Share This Page