limiting the amount of resources used by perl

Discussion in 'Perl Misc' started by Guest, Aug 13, 2007.

  1. Guest

    Guest Guest

    Is there way to limit the amount of resources/ram/cpu used by a perl
    script? so that the script still runs, but does not exceed certain limits?
     
    Guest, Aug 13, 2007
    #1
    1. Advertisements

  2. Guest

    xhoster Guest

    Your OS should provide facilities for this. Perl may have facilities for
    negotiating this with the OS, but they would depend on the OS.
    In the case of ram, what would you have it do? In very specific cases,
    there are options. But in a general purpose language not designed for only
    those specific cases, what exactly do you do when you ask for more memory
    and are told you can't have any more?

    Xho
     
    xhoster, Aug 13, 2007
    #2
    1. Advertisements

  3. Under unix, you might be interested in the nice-command (see "man
    nice"). Personally I use it only for cronjobs.

    --
    Bart

    "It is necessary for technical reasons that these nuclear warheads are
    positioned with the TOP at the BOTTOM and with the BOTTOM at the TOP.
    In order that there may be no doubt as to which is the TOP and which
    is the BOTTOM, it shall be seen that the BOTTOM of each nuclear
    warhead has been labeled with the word TOP."
    (Instructions issued by the British Admiralty, 1950's)
     
    Bart Van der Donck, Aug 14, 2007
    #3
  4. If the OP is using Unix he might also be interested in the
    ulimit or limit (depending on the shell he's using) command.
    But since he seems to be posting from a Windows machine this
    as well could be completely uninteresting for him...

    Regards, Jens
     
    Jens Thoms Toerring, Aug 14, 2007
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.