From: "Berger, Daniel" Date: 2003-09-18T06:38:24+09:00 Subject: Testing for memory leaks This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C37D64.007DE79E Content-Type: text/plain Hi all, Being as I write a lot of extensions, I've discovered that it's best to check for memory leaks. The way I'm doing this now is something like this: # pseudo code while 1 call some_method if Linux or BSD check /proc/Process.pid/fd count elsif Solaris check pfiles Process.pid count elsif Win32 start Task Manager and watch used file descriptors and memory for Process.pid end sleep 1 end # Ctrl-C to break out of loop only after at least 10 iterations Is there a better and/or more streamlined way to do this? Any chance of adding assert_no_memory_leak to TestUnit, for example? Regards, Dan ------_=_NextPart_001_01C37D64.007DE79E Content-Type: text/html Content-Transfer-Encoding: quoted-printable Testing for memory leaks

Hi all,

Being as I write a lot of extensions, = I've discovered that it's best to check for memory leaks.  The way = I'm doing this now is something like this:

# pseudo code
while 1
    call = some_method
    if Linux or = BSD
       = check /proc/Process.pid/fd count
    elsif = Solaris
       = check pfiles Process.pid count
    elsif Win32
       = start Task Manager and watch used file descriptors and memory for = Process.pid
    end
    sleep 1
end

# Ctrl-C to break out of loop only = after at least 10 iterations

Is there a better and/or more = streamlined way to do this?  Any chance of adding = assert_no_memory_leak to TestUnit, for example?

Regards,

Dan
   

------_=_NextPart_001_01C37D64.007DE79E--