home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
appvm-0.9.lha
/
AppVM
/
README
< prev
next >
Wrap
Text File
|
1994-05-29
|
5KB
|
136 lines
*************************************************************************
* *
* Conditions of use APPVM 1.0 *
* ----------------- --------- *
* *
* This program has been provided for the enjoyment of the masses. *
* It is Public Domain. *
* Since the author doesn't ask for anything in return, the user *
* will accept the following conditions: *
* *
* 1) In no case whatsoever shall the author be liable for any *
* damages, losses etc... due to the use of this program. *
* 2) Distribution of the program is only allowed subject to the *
* following restrictions: *
* *
* 2.a) No file part of this distribution will be omitted or *
* modified in any way. *
* 2.b) None of the files which are part of this distribution *
* should be stored on environmentally unfriendly media. *
* (e.g. paper! (listings, faxes)) *
* *
* Laurence Vanhelsuwé *
* 29-APR-92 *
* *
*************************************************************************
Program Title : APPVM (APPlication Virtual Memory) (Version 1.0)
-----------------------
Author : Laurence Vanhelsuwé
----------------------------
1. Requirements/Installation:
--------------------------
This version of APPVM requires the 68030 because it uses its
on-chip MMU heavily.
Owners of 68020+68851 based systems should write to me if they
want support for their configuration.
In addition to this hardware requirement APPVM also requires
hard disk "swap space"; typically 10 Mb at least.
2. How to use it:
--------------
Add a line in your startup-sequence or user-startup like:
RUN APPVM 20 T:SWAP.SYS
This would load the virtual memory manager, create a 20 MEGABYTE
file in the T: directory and patch the system.
Once APPVM signals it's READY via the welcome message on the console,
other programs are invited to start using the enhanced
- AllocMem() and FreeMem()
- Read() and Write()
calls which support the new Virtual Memory.
3. APPVM: it's uses.
-----------------
As the name suggests, APPVM is a virtual memory system for application
programs.
In other words, the system isn't allowed to "see" any VM pointers
returned by AllocMem(). The exception are the functions listed above.
This version also limits the number of programs using VM at the same
time to .... 1 (one).
Apart from that, any program which successfully receives a non-zero
return from AllocMem() when specifying the new memory class MEMF_VM
can address a block of memory as large as that managed by APPVM which
is determined by the megabytes argument when starting up APPVM.
4. Internals:
----------
All VM pointers returned by AllocMem() have bit 31 set.
For example: $80000000 points to Virtual Memory, not Physical RAM !
5. APPVM Limitations/Warnings:
---------------------------
Since this program was an exercise, and never aimed to produce a real-
world product, APPVM has a serious limitation: it only services one Task
at a time.
If a certain Task is the first to do a VM AllocMem(), then all others
will be barred from using VM until the previous one has released its
block of Virtual Memory space.
6. History:
--------
This version was written as an exercise to prove some Commodore
software engineer wrong. He thought doing real MMU-assisted virtual
memory on the Amiga was impossible. Well, it ain't of course !
In my programs I don't like messing about with functions like getch(),
readln() or any similar inefficiencies... instead I prefer to load
files in their entireties and process them at lightning speed while
they're in RAM.
Obviously this is not a generic solution which works in all situations
but nevertheless one that does wonders to one's own little set-up
provided you've got a couple of megabytes in your machine.
One of my programs (called WFR) does a word frequency scan using this
"file cacheing" method.
One day I wanted to create a huge word list to enhance my spelling
checker by giving WFR a 20Mb text file off one of the CDTV Encyclopedia
titles... just to remember that my WFR wouldn't handle that kind of file
size.
Too stubborn to change it to use buffered loading of chunks, I thought
of writing a true virtual memory system so my WFR could still do the
job virtually unmodified (just change one AllocMem argument).
So I wrote APPVM... just to find that WFR accesses memory in such a
random way that disk thrashing still brings my WFR to its knees.
So in the end I still had to modify WFR's internals! (bloody computers).
7. Credits:
--------
Any comments, ideas or bug reports?
My name and address are:
Laurence Vanhelsuwé
Christinastraat 105
B-8400 Oostende
BELGIUM
Enjoy !