[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: XY and Memory Weirdness



On 30 Jan 97 at 10:40, Stephen A. Carter wrote:

> And as a result of all these changes, free memory has jumped
> from around 199 to more than 340. I wouldn't have believed it
> possible.

I would be curious as to how much RAM you have before you load
XyIII+. Run chkdsk from DOS and note what it says for total
bytes memory and bytes free. Then run XyWrite without a file;
editor.exe. Go to the memory screen via

  func me

on command line, and note Available Memory. It all depends on
what you've got loaded into XyWrite (as well as how much free DOS
RAM you have going in, of course) so Available Memory in Xy is
obviously going to vary, especially due to various printer
drivers and such. I'd be inclined to say you should have at
least 400k Available Memory when XyIII+ starts (sans any document
files) and still be fully functional. Again, this will vary
among users and their respective overhead (such as print driver),
TSRs, etc.

Since XyIII+ is so reliant on conventional memory, a good
strategy is to run a tight ship memory-wise. Don't load heavily
commented things; e.g., if a printer file is filled to excess
with comments, make a second copy of the commented file, name it
accordingly, and get rid of or minimize the amount of comments in
the loaded counterpart. If you're loading XyIII's large help
file and don't need it, load the smaller help file. If you don't
need that one either, don't load any. You can make your own, of
course, streamlined to just your needs. If you're not running
XPL through help frames and are just referring to Help for
reminders and such, make a text file instead and refer to that.
You can always load these things when you need them, unload when
you don't. If I recall correctly, you don't even need any
printer driver loaded for default character-based settings until
you're ready to print but customizations might necessitate
loading a printer driver. The defaults file you load is a
printer driver of sorts (they both have the ;PR; header) and
might be all you need while writing. Might not.

Similarly, if you do create custom Help stuff, keep the keyword
label names short.

Bad:

 {{5,basic-layout-for-email}}

Good:

 {{5,email}}

Better:

 {{5,em}}

Those keyword labels add up, and consume XyIII+ memory.

Of course, since memory is important, and since I subscribe to
the saying a la Wintel computers especially, "If you think you
have enough memory, you're probably not using it right," I would
suggest you make sure your DOS memory setup is optimal or close
enoughl. I don't know which DOS version you have (if it has
MEMMAKER, you might want to read about MEMMAKER in the manual if
you haven't utilized it already).

If your DOS has the MEM command, you might want to issue the
command:

  mem /c/p

to have a looksee at where your system memory is going.
  
Older drivers, such as EMS drivers, use more memory than some of
the newer ones (if you're using an EMS driver). If you're using
a mouse on your system and not using it too often, alas the older
mouse drivers consume less memory than the newer ones and work
fine in later versions of DOS. A lot of systems come with
ANSI.SYS loaded in CONFIG.SYS. Depending on what you're doing
with your computer, you might not need ANSI.SYS at all. Or you
can do better with one of the good replacements, such as
ZANSI.SYS. If you're using a disk cache (DOS or X/EMS),
depending on the cache program, the larger the cache size, the
more core RAM it requires. You might find that your cache
setting has caused the cache program to use more RAM than a
reduced setting by only a few bytes. This has been known to
happen in various EMS disk caching programs especially. For
example, the EMS cache is argued in pages (of 16k each) thus your
command might be something like:

    CACHE 20

And it creates a disk cache in EMS of 20 pages (20*16k = 320k
cache). This setting uses, say, 12k of conventional RAM.
Interestingly, a cache setting of 19

    CACHE 19

Might in fact reduce the cache program's demand of RAM by 7k,
thus now using only 5k of conventional RAM. This is because the
program requires more core RAM as the size of the cache increases
and it could just so happen that your setting is the very next
value that pushes the cache program into requiring more RAM. In
other words, a setting of 1 to 19 pages requires xx amount of
core RAM, and a setting of 20 to 30 requires xxx more amount of
core RAM. As luck would have it, your setting might be the one
next value that pushes the program into requiring more core RAM.

So the tradeoff is you reduce your cache by one EMS page (16k and
have a cache of 304k instead of 320k) but now have 7k more
conventional RAM.

If you're using a newer DOS and can load things into hi memory,
such as drivers and whatnot, do it. Various things in CONFIG.SYS,
such as BUFFERS, FILES, LASTDRIVE, environment size, etc., use
RAM. Don't set 'em higher than what you need. If you're using a
RAM drive, some RAM drive drivers require less core RAM for
themselves than others and even do a better job (such as allowing
for resizing the RAM drive on-the-fly).

Plus if you're running a mono system or running a graphical
system in MODE MONO, you can probably take advantage of programs
that grab some of the memory from the video block above 640K and
give it to lower DOS. Such programs can give you 704K instead of
640K and some even deliver as much as 736K or more. (Depends on
your computer system.) Of course, your programs will still be
limited to the 640K barrier, but if you start out with, say,
704K, then you have that much more RAM to load TSRs or whatnot
before reducing the 640K.

Obviously there's much you can do to maximize available memory
(in XyWrite as well as in DOS). And there is much you can't do,
such as how competently or incompetently a program handles heap
space, stacks, leaky memory (leaving footprints rather than
cleaning up), whatever, and its own internal handling of memory.
I wouldn't get neurotic about it but it all adds up and at least
tending to the simple things is sure to reclaim otherwise wasted
memory.

You can screw around with XyWrite and not get into trouble but
never, NEVER, mess around with DOS unless you have a bootable
backup diskette to boot from floppy. If you do something that
affects, say, the video via startup and your screen is black,
you'll want to be able to reboot via floppy and move over to the
hard disk to either kill or change your startup files. Of
course, if you know your computer blindfolded you can work in the
dark, so to speak, or work from printouts, but it's best to have
a bootable safety diskette at hand.

Lastly, since I don't know what version DOS you use, nor what
utilities you use in memory, I can't comment, but some of the
older utilities we used to speed things up (like keyboard rate)
can be set in CMOS with versions of DOS and therefore don't need
to be used as standalone utilities consuming RAM.

Plenty to consider, or, forget about it until your system grinds
to a halt due to insufficient memory.

Regards,

Bob (if it ain't broke, break it) Brody