1. memory?

hi all

wait a moment please... your program has run out of memory.

ugh. 

I got this error message after processing 86 out of 766 items. How
much memory do I have available? Anyway to increase it? I can't 
possibly be near the limit of my 16 Mega. Can't possibly be that 
much memory used by my processing program. Hate the idea of
rewriting everything to process in little chunks and bits. Storing to
files. in and out. slow slow slow. If I have to I guess I could but, again,
how much memory do I have available so I know what size chunks
of data to work with? 
Thanks for any advice.
JOHN

new topic     » topic index » view message » categorize

2. Re: memory?

Hi John,

> wait a moment please... your program has run out of memory.
> ugh. 

If you run Eu dos32 program in the win window (DOS session),
Windows doesn't allow swapping of your program's code and 
data into the system swap-file. Windows swaps only *own*
code and data to release only all RAM for your Eu dos32
program. So, run dos32 program on plain DOS 7.1
to use Euphoria's *own* swap-file.

If you run Eu win32 program, this program use the system
swap-file. If your system swap-file is limited of size,
you may get this message above.

If you run DJGPP compiler, you must run it on plain DOS 7.1
and load *own* DJGPP's DPMI server to have swap-file.

Regards,
Igor Kachan
kinz at peterlink.ru

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

3. Re: memory?

John, Igor, everyone.

I believe it is possible to do what John needs to, but it requires writing a
Windows memory management DOS app. I've seen it done with C (old standard C,
not C++); the guy who did it bordered on genius, and still it crashed on him
every other hour, even though he had put together a veritable Windows 98
library. Books, not dlls.

What you can do, and it's far easier, is to manage your own swap file
instead of allowing Windows to do it. Anyway, a Win95+ or NT4+ system swap
file, allowed to grow as needed (not fixed size) with enough disk space,
should not give an error, though it may be somewhat slower than you'd like.

Gerardo

----- Original Message -----
From: "Igor Kachan" <kinz at peterlink.ru>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, June 12, 2001 4:33 AM
Subject: Re: memory?


> Hi John,
>
> > wait a moment please... your program has run out of memory.
> > ugh.
>
> If you run Eu dos32 program in the win window (DOS session),
> Windows doesn't allow swapping of your program's code and
> data into the system swap-file. Windows swaps only *own*
> code and data to release only all RAM for your Eu dos32
> program. So, run dos32 program on plain DOS 7.1
> to use Euphoria's *own* swap-file.
>
> If you run Eu win32 program, this program use the system
> swap-file. If your system swap-file is limited of size,
> you may get this message above.
>
> If you run DJGPP compiler, you must run it on plain DOS 7.1
> and load *own* DJGPP's DPMI server to have swap-file.
>
> Regards,
> Igor Kachan
> kinz at peterlink.ru

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

4. Re: memory?

Ýòî ñîîáùåíèå â ôîðìàòå MIME ñîñòîèò èç íåñêîëüêèõ ÷àñòåé.

------=_NextPart_000_01C0F40E.DFE32A20

Hi John,

> >> wait a moment please... your program has run out of memory.
> >> ugh. 
> 
> >If you run Eu dos32 program in the win window (DOS session),
> >Windows doesn't allow swapping of your program's code and 
> >data into the system swap-file. Windows swaps only *own*
> >code and data to release only all RAM for your Eu dos32
> >program. So, run dos32 program on plain DOS 7.1
> >to use Euphoria's *own* swap-file.
> 
> Let me see if I understand this:
>   If I run my euphoria program with windows in the background I
> can't use all my system's memory, just whatever windows allotted
> my program. To use all my memory I must reboot in msdos mode, no
> windows. Correct? And I still don't know how much memory I have
> available using a euphoria dos program under (over) windows.

All system's memory - this is RAM (yours 16M) and swap-file.
Swap-file is system's one if this is OS's swap-file.
On plain DOS (reboot in msdos mode) Eu has *own* swap-file,
because of the plain *msdos mode* has *no* the system swap-file.
On Windows, only system swap-file exists and Windows uses
this swap-file to *free only RAM* (yours 16M) for your dos32
Eu program.

Just run you program after rebooting in msdos mode and
Eu will use *own* swap-file to the end of the free disk space,
if 16M is too little RAM memory for your program.


> >If you run Eu win32 program, this program use the system
> >swap-file. If your system swap-file is limited of size,
> >you may get this message above.
> 
> I was just writing a euphoria dos program, not a euphoria windows
> program, so, if I change it into a euphoria windows program I can
> get to use more of my system's memory. Correct? Unless the swap-file
> is a limited size. How can I check that? Is this the same thing
> Bernie was suggesting by  "You may be running out of hard drive 
> swap space."?

Yes, Bernie is right, if you run pure msdos mode.

But If you run dos32 program on 'windows in the background',
your dos32 program has only all system RAM (yours 16M),
without swap-memory-space.

This subject was discussed in our list in the past,
I can add my answer to Florian for detailes. See below.

<-------
Dear Florian, 

> I would like to know if someone can help me :
> I would like to make a program that uses a maximum of memory, but
> without swap memory.
> Florian from France

Try please
---------
sequence S
S={}
atom N
N=0
while 1 do
N+=1
S=append(S,N)
end while
--------
This program must be for DOS32,
file with .ex extention, and run
in DOS window on Windows.
This program will occupy the whole
of RAM and stops with the error
message and the ex.err file.
In file ex.err, you can read
maximum  N.
It seems, Windows doesn't allow
swapping of DOS32 programs
and swaps only own code and data.

You can see my results and test
program in the attachment.

On Windows 95 in DOS window,
N was 834907 with 8M RAM
and 14M of the free disk space.

On plain DOS32, N was 1630691.

On plain DOS32, when swap file
was blocked with option
set causeway=NOVM (in autoexec.bat)
N was 834907, same as on Windows 95.
------->

But, John, if your dos32 program is not *graphics*
one, you can try just rename the extention from
.ex into .exw and run it under exw.exe control
on 'windows in the background'.
Then it will use all *system memory*,
i.e. not only all RAM, but + all disk swap-space.
Attachment's program (same above) with .exw 
extention uses all *system memory*.


Regards,
Igor Kachan
kinz at peterlink.ru


------=_NextPart_000_01C0F40E.DFE32A20
Content-Type: application/octet-stream; name="Flor.ex"
Content-Transfer-Encoding: 7bit
Content-Description: Flor.ex (EX )
Content-Disposition: attachment; filename="Flor.ex"

sequence S
atom N
S={}
N=0
while 1 do
N+=1
S=append(S,N)
end while

------=_NextPart_000_01C0F40E.DFE32A20
Content-Type: application/octet-stream; name="Florex1.err"
Content-Transfer-Encoding: quoted-printable
Content-Description: Florex1.err (ERR )
Content-Disposition: attachment; filename="Florex1.err"

flor.ex:7
Your program has run out of memory.
One moment please...=20

Global & Local Variables

 flor.ex:
    S =3D =
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
25,26,27,28,29,30,31,32' ',33'!',34'"',35'#',36'$',37'%',38'&',39''',
40'(',41')',42'*',43'+',44',',45'-',46'.',47'/',48'0',49'1',50'2',51'3',
52'4',53'5',54'6',55'7',56'8',57'9',58':',59';',60'<',61'=3D',62'>',63'?'=
,
64'@',65'A',66'B',67'C',68'D',69'E',70'F',71'G',72'H',73'I',74'J',75'K',
76'L',77'M',78'N',79'O',80'P',81'Q',82'R',83'S',84'T',85'U',86'V',87'W',
88'X',89'Y',90'Z',91'[',92'\',93']',94'^',95'_',96'`',97'a',98'b',99'c',
100'd',101'e',102'f',103'g',104'h',105'i',106'j',107'k',108'l',109'm',
110'n',111'o',112'p',113'q',114'r',115's',116't',117'u',118'v',119'w',
120'x',121'y',122'z',123'{',124'|',125'}',126'~',127'=7F',128,129,130,131=
,
132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,
150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,
168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,
186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,
204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,
222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,
258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,
276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,
294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,
312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,
330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,
348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,
366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,
384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,.=
...
    N =3D 834907


------=_NextPart_000_01C0F40E.DFE32A20
Content-Type: application/octet-stream; name="Florex2.err"
Content-Transfer-Encoding: quoted-printable
Content-Description: Florex2.err (ERR )
Content-Disposition: attachment; filename="Florex2.err"

flor.ex:7
Your program has run out of memory.
One moment please...=20

Global & Local Variables

 flor.ex:
    S =3D =
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
25,26,27,28,29,30,31,32' ',33'!',34'"',35'#',36'$',37'%',38'&',39''',
40'(',41')',42'*',43'+',44',',45'-',46'.',47'/',48'0',49'1',50'2',51'3',
52'4',53'5',54'6',55'7',56'8',57'9',58':',59';',60'<',61'=3D',62'>',63'?'=
,
64'@',65'A',66'B',67'C',68'D',69'E',70'F',71'G',72'H',73'I',74'J',75'K',
76'L',77'M',78'N',79'O',80'P',81'Q',82'R',83'S',84'T',85'U',86'V',87'W',
88'X',89'Y',90'Z',91'[',92'\',93']',94'^',95'_',96'`',97'a',98'b',99'c',
100'd',101'e',102'f',103'g',104'h',105'i',106'j',107'k',108'l',109'm',
110'n',111'o',112'p',113'q',114'r',115's',116't',117'u',118'v',119'w',
120'x',121'y',122'z',123'{',124'|',125'}',126'~',127'=7F',128,129,130,131=
,
132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,
150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,
168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,
186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,
204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,
222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,
258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,
276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,
294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,
312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,
330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,
348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,
366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,
384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,.=
...
    N =3D 1630691


------=_NextPart_000_01C0F40E.DFE32A20
Content-Type: application/octet-stream; name="Florex3.err"
Content-Transfer-Encoding: quoted-printable
Content-Description: Florex3.err (ERR )
Content-Disposition: attachment; filename="Florex3.err"

flor.ex:7
Your program has run out of memory.
One moment please...=20

Global & Local Variables

 flor.ex:
    S =3D =
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
25,26,27,28,29,30,31,32' ',33'!',34'"',35'#',36'$',37'%',38'&',39''',
40'(',41')',42'*',43'+',44',',45'-',46'.',47'/',48'0',49'1',50'2',51'3',
52'4',53'5',54'6',55'7',56'8',57'9',58':',59';',60'<',61'=3D',62'>',63'?'=
,
64'@',65'A',66'B',67'C',68'D',69'E',70'F',71'G',72'H',73'I',74'J',75'K',
76'L',77'M',78'N',79'O',80'P',81'Q',82'R',83'S',84'T',85'U',86'V',87'W',
88'X',89'Y',90'Z',91'[',92'\',93']',94'^',95'_',96'`',97'a',98'b',99'c',
100'd',101'e',102'f',103'g',104'h',105'i',106'j',107'k',108'l',109'm',
110'n',111'o',112'p',113'q',114'r',115's',116't',117'u',118'v',119'w',
120'x',121'y',122'z',123'{',124'|',125'}',126'~',127'=7F',128,129,130,131=
,
132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,
150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,
168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,
186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,
204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,
222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,
258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,
276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,
294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,
312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,
330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,
348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,
366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,
384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,.=
...
    N =3D 834907


------=_NextPart_000_01C0F40E.DFE32A20--

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

5. Re: memory?

Hi again John,


> Let me see if I understand this:
>   If I run my euphoria program with windows in the background I
> can't use all my system's memory, just whatever windows allotted
> my program. To use all my memory I must reboot in msdos mode, no
> windows. Correct? And I still don't know how much memory I have
> available using a euphoria dos program under (over) windows.


There is one trick in the Euphoria Programming System,
which allow to lull Windows's vigilance to sleep and 
use system swap-file with the commands of dos32 
interpreter   smile

You just must to have two programs, the first
is prog.ex and the second is prog.exw

---- prog.ex
integer i
i=system_exec("exw.exe prog.exw", 0)
---- end of prog.ex


---- prog.exw
sequence S
atom N
S={}
N=0
while 1 do
N+=1
S=append(S,N)
end while
---- end of prog.exw

So, if your dos32 program run out of memory,
you can write critical part as .exw program,
call this .exw program from .ex program,
save data, return into .ex program and so on.

Try example above, it works for me and uses
all system memory, i.e. all RAM + all disk space.

Regards,
Igor Kachan
kinz at peterlink.ru

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

6. Re: memory?

My thanks to Gerardo, Igor and Lewis for help
with my memory problem.
Going into msdos mode did the trick. I let it run
while I made and ate breakfast, and it chugged along
beautifully. Had to reboot afterwards though. The 
character set was overwritten and I only got blobs 
on the screen instead of letters. But the processed 
data base file was just fine.
The other solutions are really interesting and I'm
saving them for the future.
JOHN

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

Search



Quick Links

User menu

Not signed in.

Misc Menu