in reply to Re: Is (DOS-)Perl a Memory Hog?
in thread Is (DOS-)Perl a Memory Hog?

Yes, I really mean MS-DOS not operating within Windows.

This computer, with its meager 40MB, is set up for running custom psychophysiology software under DOS, so that it can assume complete control over the processor (for timing-critical stimulus/monitoring control). How much memory it uses depends on the particular experiment programmed and what images and sounds it preloads. I'm sure it can get by sharing with Perl, if Perl will share with it.

My script for trying to run the other program is this:
#!/perl/bin/perl -w
use strict;
my @args = ("STIM2", "/SESSION=none", "/ORDER=bx-err1", "/WARN=1");
system (@args) == 0
or die "System call failed: $?";

But the script I used to check Perl's memory hogging (where it showed all extended memory was used up) was this:
#!/perl/bin/perl -w
use strict;
system ("MEM") == 0
or die "System call failed: $?";

If there's a way of telling Perl to only take what it needs, I'd love to know. Thanks.

Replies are listed 'Best First'.
Re: Re: Re: Is (DOS-)Perl a Memory Hog?
by pbeckingham (Parson) on May 11, 2004 at 02:09 UTC

    I'm going to hell for saying this, but your first Perl script would be better written as a DOS batch file, which reduces the memory requirements to almost nothing.

      I give up. Although it would have been more elegant doing everything in Perl, since I don't have the expertise to recompile Perl for MS-DOS (or whatever might solve the problem), I'll resort to using batch files.

      (I guess I'll be seeing you in hell.) :-)

      Thanks for the good intentions.

Re: Re: Re: Is (DOS-)Perl a Memory Hog?
by tachyon (Chancellor) on May 11, 2004 at 10:17 UTC

    Just write a DOS batch file

    rem start.bat, save in path then just type start @echo off stim2 /session=none /order=bx-err1 /warn=1

    Command line args can be passed and appear in %1, %2, %3 etc like $ARGV[0], $ARGV[1], $ARGV[2].....

    See This batch file tutorial

    cheers

    tachyon