1. I need a memory eater

Anyone have a tsr that will limit the amout of memory available so I can
try my programs in different memory configurations?

new topic     » topic index » view message » categorize

2. Re: I need a memory eater

You might just edit the msdos session properties for the program you
are testing, assuming you are using win95 or os/2, and not dos.  (This
will work under os/2, but I'm not sure what steps to go through)

In win95, just create a new shortcut on your desktop called "Memory Eater"
(or whatever) and point it to the file "C:\WINDOWS\COMMAND.COM".
Once you are finished, right click the new icon and choose "Properties"
from the drop down menu.  Choose the "Memory" tab, and change the
EMS, XMS, and DPMI properties from "Auto" to whatever values you want.
ie. change EMS to 4 megs and XMS to "none".  Now, when you run that
ms-dos session, and type "mem /c" you will see the total amout of XMS
memory in the pc, the amount of free XMS (which will be 0, after all
you set it to "none"), and the total & free amounts of EMS.

Notice, however, that you cannot set DPMI to less than 1 meg.  I don't
know why this is, but that's the way things are.

Anyway, this should work perfectly, and without the need for any wierd
"memory eating TSR's".  BTW, this will only affect this ms-dos shortcut.
Any other shortcuts you have will be unaffected.  Hope this helps!

James Powell
(Yes, I know I've been gone for a while but I'm back now, and still having
fun with Euphoria.)

new topic     » goto parent     » topic index » view message » categorize

3. Re: I need a memory eater

On Tue, 21 Oct 1997, James Powell wrote:
> You might just edit the msdos session properties for the program you
> are testing, assuming you are using win95 or os/2, and not dos.  (This
> will work under os/2, but I'm not sure what steps to go through)

I use DOS only.  win95 sucks.

new topic     » goto parent     » topic index » view message » categorize

4. Re: I need a memory eater

At 05:50 PM 10/21/97 -0700, you wrote:
>On Tue, 21 Oct 1997, James Powell wrote:
>> You might just edit the msdos session properties for the program you
>> are testing, assuming you are using win95 or os/2, and not dos.  (This
>> will work under os/2, but I'm not sure what steps to go through)
>
>I use DOS only.  win95 sucks.
>
>


        Michael,

        Why not write your own memory eater in euphoria?  have it accept on the
command line two parameters:  bytes/kbytes to eat and the name of the
program to run after mem has been eaten.
        Then allocate bytes/kbytes and lock them; they should be then 'eaten'.
        Then execute the program you want to test via system().

The only thing  i'm not sure of is how to tell how much memory has
        already
been used up by the euphoria session instigated by the memory eater program
(i.e. how much used up before allocation).  I imagine something of Jacques
Deschenes' addresses that.

-----------------------------------
Craig Gilbert
cgilbert at cennet.mc.peachnet.edu
"Positing infinity, the rest is easy."
-- Roger Zelazny, in 'Creatures of Light and Darkness'
-----------------------------------

new topic     » goto parent     » topic index » view message » categorize

5. Re: I need a memory eater

Craig Gilbert wrote:

> At 05:50 PM 10/21/97 -0700, you wrote:
> >On Tue, 21 Oct 1997, James Powell wrote:
> >> You might just edit the msdos session properties for the program
> you
> >> are testing, assuming you are using win95 or os/2, and not dos.
> (This
> >> will work under os/2, but I'm not sure what steps to go through)
> >
> >I use DOS only.  win95 sucks.

    It sure does, did you know MS pays gaming companies money to develop
their games for win95, examples are: -All Sega Games- (Sega Rally, SOnic
& Knuckles) Destruction Derby 2, Need4Speed  2, Pod, etc.    And all
those games run a lot smoother on DOS, but know their Win95-only, thank
god Carmageddon isn't Win95 only!!
    For this I hate but has to use win95....

>         Why not write your own memory eater in euphoria?  have it
> accept on the
> command line two parameters:  bytes/kbytes to eat and the name of the
> program to run after mem has been eaten.
>         Then allocate bytes/kbytes and lock them; they should be then
> 'eaten'.
>         Then execute the program you want to test via system().
>
>         The only thing  i'm not sure of is how to tell how much memory
> has already
> been used up by the euphoria session instigated by the memory eater
> program
> (i.e. how much used up before allocation).  I imagine something of
> Jacques
> Deschenes' addresses that.

Do it the other way around, have a program with 2 command line
parametes: how much memory should be available: XMS-LOW-EMS-etc.Use
Jaques Deschenes routine to figure out how much memory available is, and
allocate (either high or low, you should specify this) the memory that
we don't want to be able to acces.
If you put all this in *one* routine, Euphoria will not change the
amount of memory available. (that is, before checking thus) Also note
that you should give the atoms that hold the amount of memory available,
a 31-bit integer value already (else more memory is allocate after the
checking for available memory, because the 4-byte integer is converted
to 31-bit-integer.

I think this should work.... .. try!

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu