You've already got some good replies, but I'll try to add my
(incomplete) knowledge for completeness (corrections welcome).

On Tue, Dec 27, 2011 at 1:08 PM, Koh Choon Lin <2choon...@gmail.com> wrote:
> 1. Would like to ask how much memory does FreeDOS support, e.g. 4 GiB?

FreeDOS can run on any x86 machine with a BIOS. Hence, 8088 can only
access 1 MB (typically 640 kb minus DOS system itself) not counting
EMS, 286 only goes up to 16 MB, 386 only to 2 / 3 / 4 GB (in theory),
not counting PAE (PPro / i686).

KERNEL.SYS doesn't handle anything outside 1 MB (I think?), so you
have to use HIMEMX (or similar, e.g. XMGR, FDXMS286) and/or JEMM386 to
access more (or enable unreal mode on 386+). Your apps themselves must
be aware of such things, e.g. XMS, EMS, etc. to access it, so they
won't all magically work.

DPMI typically piggybacks atop raw, XMS, VCPI, or (another) DPMI host
if found. Different ones have different limits. In particular, I've
seen different effects in CWSDPMI r5, HDPMI32, CWSDPMI r7.

CWSDPMI r5 is older and doesn't use 4 MB [586+] pages, hence it's
slower and slightly more outdated (barely), so I'd suggest r7. This
machine here has 6 GB, but r5 reports 1.8 GB, HDPMI32 reports 2.6 GB,
and r7 reports 4 GB. But with r7, GCC 4.6.2 chokes somewhere when
trying to allocate 400+ MB of RAM for -O2 optimizations (silly
compiler), so that may be a rare bug (hopefully to be looked into
eventually, but CWS is a busy genius, heheh).

I have almost never allocated anywhere near 1 GB of RAM by myself. I
think paq8o8z -8 will use approx. 1.5 GB (slowly), but beyond that, I
don't know. I think CWS told me that you should use sbrk() directly if
accessing more than 2 GB of RAM. I'm not sure how to do it as
presumably most people never bothered and a lot of things (malloc?)
just assumed 2 GB limits.

There is an experimental PAE version of DOS/32A 9.1.2 (OpenWatcom
extender), but I've never tried it. Again, I have no idea what the
libc will do if you try allocating too much, and esp. PAE is beyond me
(only access 4 GB at a time out of total 64 GB??).

> 2. Does it faces 640 KiB limitation as MS-DOS, e.g. Do I have to "load
> high" drivers to save on conventional memory?

The only limitations are DOS and your DOS apps, so it depends on what
each one wants. Yes, traditionally, it still has to (partially) run in
low RAM, so you'll want to save space. Without XMS (286+) loaded,
you'll only get approx. 400 kb free (and should use vspawn + FreeCOM),
otherwise (using XMS_Swap FreeCOM) you should get about 600 kb. That
should be enough for almost anything (not counting extended RAM, as
even most DOS apps assume it nowadays).

> 3. Does it support usage of a swap file/partition?

Not exactly. There is no dedicated swap partition, and there is no
central memory manager. However, some DOS extenders support virtual
memory. DOS/4GW 1.97 supports like 32 MB, I think??, and Causeway can
support similar too. CWSDPMI will swap (in theory) and is probably the
best (most common too), but it doesn't always work on every machine
(e.g. "4 GB free, 0 kb swap free", which is weird, as even r5 shows
some swap space available). So it depends on how much HD you have free
on your pre-existing FAT drive (usually C:\ and often hardcoded but
sometimes can be configured, e.g. CWSPARAM or "cwsdpmi -sd:\").

Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
Freedos-user mailing list

Reply via email to