[comp.windows.ms] Non-windows application problems

krotz@motcid.UUCP (Scott A. Krotz) (08/08/90)

In a previous article I wrote:
>
>  I am having problems running non-windows applications using
>the 386 enhanced mode of windows 3.0, and it is beginning to
>drive me nuts.  I have a 386SX with 2 meg of ram, AMI Bios, and
>am running with virtual memory off.  When I call up a dos shell
>with the dos icon, I have about 800k of memory left.  However,
>I cant call up another dos window, it tells me I have
>"insufficient memory to start application."  I also tried creating
[ further stuff deleted ]

I received the reply:
>When you are running in 386 enhanced mode, virtual memory is turned on.
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Hence, Windows reports that you have 800k of memory left.  Unforuntunately,
>non-windows applications can not run in virtual memory.  Windows must
>allocate physical memory to those applications.  On your 2 meg system,
>you only have a bit over 1 meg left after Windows is loaded.  So there
>is no way for you to run 2 640K dos windows.

This is untrue.. I have Paging=no so that virtual memory is turned off.  Thats why
I start up with 1400k free instead of 4000k.  My question, however, still remains..
Why can't I start up another dos box when windows says I have 800k free?  I have
created a "small" dos box that only uses about 200k when I start it, but I can't call
up more than two or three of those.  Windows says I have insufficient memory to start up a
fourth, even though it reports about 600k free.  If I am running out of memory
because windows is using it to save screen info or virtual 86 system info or something,
that is fine... but then why does it report 600k free?  That should be plenty of room to
start up a 200k dos box, right?  I even have trouble starting up normal windows
applications, like the paint program after I have opened up three of these "small" dos
windows.... Insufficient memory again.  I HAVE 600K FREE, THOUGH!!!  I remember
when 16k was a lot of memory, and windows can't start up an application with 600k?
I know that the paint program does not use 600k....  What is going on here?  Is there
an incompatability with my system? Is anyone else with a 2meg system having this kind
of a problem??  There almost seems to be a limit at about 530k that I cannot cross in
the 386 enhanced mode, but in the standard mode I can start up as many apps as I want,
and get the free memory down to 200k and below...(My head hurts)

Many thanks for advice in advance..
Scott Krotz

-----------------------------------------------------
| email to:       UUCP:  uunet!motcid!krotz         |
|             Internet:  motcid!krotz@uunet.uu.net  |
-----------------------------------------------------

joonsong@tornado.Berkeley.EDU (Suk-Hyun Song) (08/09/90)

In article <4325@buff3.UUCP> krotz@motcid.UUCP (Scott A. Krotz) writes:
.
[stuff deleted]
.
>This is untrue.. I have Paging=no so that virtual memory is turned off.
>Thats why I start up with 1400k free instead of 4000k.  My question, however,
>still remains..  Why can't I start up another dos box when windows says I have
>800k free?  I have created a "small" dos box that only uses about 200k when I
>start it, but I can't call up more than two or three of those.  Windows says I
>have insufficient memory to start up a fourth, even though it reports about
>600k free.  If I am running out of memory because windows is using it to save
>screen info or virtual 86 system info or something, that is fine... but then
>why does it report 600k free?  That should be plenty of room to start up a
>200k dos box, right?  I even have trouble starting up normal windows
>applications, like the paint program after I have opened up three of these
>"small" dos windows.... Insufficient memory again.  I HAVE 600K FREE,
>THOUGH!!!  I remember when 16k was a lot of memory, and windows can't start up
>an application with 600k?  I know that the paint program does not use 600k....
>What is going on here?  Is there an incompatability with my system? Is anyone
>else with a 2meg system having this kind of a problem??  There almost seems to
>be a limit at about 530k that I cannot cross in the 386 enhanced mode, but in
>the standard mode I can start up as many apps as I want, and get the free
>memory down to 200k and below...(My head hurts)
>
>Many thanks for advice in advance..
>Scott Krotz

Sorry, I misunderstood your original post.

Windows reports the amount of free memory available.  It does this by adding
up all of the individual blocks of memory available.  However, even when 
Windows reports 800k of memory available, the largest block of contiguous
memory may be less than 200k.  But programs require a certain amount of 
contiguous memory to load.  So when you try to run even a 200k program, 
Windows will report insufficient memory if the largest block of contiguous 
memory is less than 200k.  

Memory in 386 enhanced mode is highly fragmented.  With paging=on, this is
not a problem.  However with paging=off, you are stuck.

DOS windows are still stuck at 640K-DOS-overhead ~=~ 530K.

    Joon Song
    joonsong@ocf.berkeley.edu