in reply to Re^13: time and mem usage of pgm
in thread time and mem usage of pgm

in

print time - $^T, " seconds\nRam:", mem;

is mem a variable?

on win7, I get the same output

Ram: mem

but when running the last perl command, I get

Error: the search filter cannot be recongnized

Replies are listed 'Best First'.
Re^15: time and mem usage of pgm
by BrowserUk (Patriarch) on Mar 17, 2015 at 20:05 UTC
    is mem a variable?

    mem is the subroutine in my original response:

    sub mem{ `tasklist /nh /fi "PID eq $$"` =~ m[(\S+ K)$] }
    but when running the last perl command, I get Error: the search filter cannot be recongnized

    Try again: Ie. cut and paste the code from the post above again.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

      it works. have messed up the code a bit

      is it possible to get the equivalent of RSS under win?

        The memory figure returned by mem(); is the Physical Memory Working Set which is (roughly) the equivalent of the RSS on modern *nix.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        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". I'm with torvalds on this
        In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked