Christof Lange wrote:
>
> Is there a way (utility) to find out the maximum size of the RAM
> disk on a system after booting to it? What will be the optimum size
> of the RAM in relation to CACHE size and performance.
There are a couple of ways to get around this problem.
The easiest way is to require the user to have 8Mb ram minimum and just
make a 5120kb ramdisk - but the self-extracting Arachne.exe will refuse
to extract in less than 6Mb (6144kb).
Another method uses FIND and MEM (or QEMM) to test for the reported
memory size string. Since you are providing the mem management software
it should be little trouble to fine tune it to the exact search string(s).
I suggest you search for the strings representing 1M bytes to 8M bytes in
1Mb steps and if you don't find one, assume it is more. <g> There may be
some reason to also search for 64k less than each of these numbers.
There is probably some utility available to do this, but you will still
have to interpret its output in your autoexec, so it won't be much help
UNLESS you can find a utility that returns an errorlevel indicating that
there is more than some requested amount available.
Here the problem is you won't get that info before your autoexec runs so
you can't load the ramdisk in config.sys if that is the type you use.
TDSK, however, loads in autoexec (or later) and has the necessary copyfree.
If there are many partitions on the HD, you need some way to determine what
the RD designator is. I prefer to discover this rather than loading extra
software to set the drive letter to some obscure value like Z. Lastdrive Z
takes up valuable memory space too.
Try this:
For %%X in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) if exist %%X:\nul
SET RDRV=%%X: (one line) (no space ^)
As you can see, RDRV will change every time the test is true and the last
value must be it.
Or maybe you could use FIND on the output of your RD creation ?
Finally, there is a BIG problem with FAT32 drives. If your supplied OS doesn't
recognize FAT32, you may get the RD created as C: Goodbye Windows !!
So, before transferring anything to the RD, check to make sure it is empty.:(
- Clarence Verge
--
- Help stamp out FATWARE. As a start visit: http://home.arachne.cz/
- The internet is infected - Windows is a VIRUS !!
--