Xref: utzoo comp.sys.m6809:862 comp.os.os9:88
Path: utzoo!attcan!uunet!tektronix!tekgen!jonh
From: jonh@tekgen.BV.TEK.COM (Jon Howell)
Newsgroups: comp.sys.m6809,comp.os.os9
Subject: Re: os9 level 2 woes!
Message-ID: <3406@tekgen.BV.TEK.COM>
Date: 18 Aug 88 23:31:46 GMT
References: <8808172042.AA01032@decwrl.dec.com>
Reply-To: jonh@tekgen.BV.TEK.COM (Jon Howell)
Organization: Tektronix, Inc., Beaverton,  OR.
Lines: 41

In article <8808172042.AA01032@decwrl.dec.com> burke_vern@mtblue.dec.com (WHY BE NORMAL?) writes:
>	I recently outfitted myself with a 128K CoCo III,2 floppy drives,
>     and OS9 level 2(version 02.00.01).I've been having some difficulty
>     getting some extra memory space.I noticed that when the shell is
>     linked at startup,19 extra command modules are also loaded into
>     RAM.I wanted to get rid of some of these because I don't use them
>     enough to justify the space.At this point, mfree showed 48K.
>     I used the level 1 save command to save just the shell module,
>     and put it in my cmds directory.Now everything boots alright and
>     the shell works alright,but I ended up losing memory instead
>     of gaining it.I only have 40K now.It seems like OS9 is still
>     assigning the memory that old shell command(shell+19 modules)
>     required.aaaarrrrrgggghhhhh!
Exactly.  The 19 commands are merged with the shell module and called "shell"
on the disk.  The CoCo3's MMU divides the 128K in your machine (or 512) into
8K blocks to be shuffled around.  Every module loaded independently takes at
least one block, and enough to fit it.  Shell only takes some 6K (I think), so
the other commands are added into the same load so that they fill in the other
2K.  If each command is loaded independently, they'd each take 8K.
[If you're a visual learner:]
  Block 1:  [S----h----e----l----l......]
  Block 2:  [Lu.........................]  (Lu=Little Utility)
  Block 3:  [Mu.........................]  (Mu=Medium Utility)
     when broken up.  Total=24K  (or 160K if all 19 utils are loaded)
     But by packing them all into one block, it all takes only 8K.  Little
     space is wasted:
  Block 1:  [S----h----e----l----lLuMu..]
Sooooo, don't bother breaking them up.  As a matter of fact, ident the other
utils you like to have loaded, and merge them together in groups which fit
neatly into a multiple of 8K.  (8192 bytes, not 8000..)
Also, I save disk space on my boot disk for important programs by doing an mdir
to find out which modules come with shell, then deleting the individual copies
of those off of the disk.

	Hope it helps,
		Jon Howell
-- 
...!tektronix!tekgen!jonh  (503) MAK-SEMA  Jon Howell   o  o  o  o  o  o  o  o
  //  //  //  _ _   _ _    .  . .   .    ___ .    _    -|--|--|--|--|--|--|--|-
 //  //  //  / / \ / / \   |\/| |\  |\ |  |  |\  /      /> /> /> /> /> /> /> />
//  //  //   \_\_/ \_\_/   |  | |"\ | \| _|_ |"\ \_