in reply to Re: Allocated memory to Script
in thread Allocated memory to Script

I added Memory::Usage to BrowserUk's script

That's all very well, but as the module doesn't work on Windows, it is entirely useless.

Replies are listed 'Best First'.
Re^3: Allocated memory to Script
by Khen1950fx (Canon) on Jul 08, 2011 at 13:30 UTC
    According to this, it does work on Windows.

      cygwin != Windows.

      # Returns # (vsize, rss, shared pages, code pages, data+stack pages) # in kilobytes. Precision is to nearest 4k page. # TODO: Proc::ProcessTable so that we can support non-Linux? my $page_size_in_kb = 4; sub _get_mem_data { my ($class, $pid) = @_; sysopen(my $fh, "/proc/$pid/statm", 0) or die $!; sysread($fh, my $line, 255) or die $!;

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Test suite is doesn't actually test the module, and neither module nor Makefile.PL exclude win32, so it gets a pass grade
        t/00-load.t ....... ok t/manifest.t ...... skipped: Author tests not required for installatio +n t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.08 required for tes +ting POD coverage t/pod.t ........... skipped: Test::Pod 1.22 required for testing POD