  | 78175 packages online |
|
 |
| | | | | No screenshot available |
|
DESCRIPTION
AllocMem is a Shell command which temporarily allocates memory.
It's main purpose is to artificially decrease the amount of RAM available
without having to copy a large file to the RAM Disk.
USAGE
AllocMem <Size> [<K/KB> or <M/MB>] (defaults to bytes)
Example: 'AllocMem 128 M'
It will allocate 128 megabytes of RAM and wait for Ctrl-C.
Once it receives the Ctrl-C signal, it frees the memory and exits.
By default the Size value is considered to be measured in bytes, unless either
the KB or MB switch is provided.
If both switches are provided, the Size value will be converted to gigabytes.
The command checks if the amount of requested memory is available and will exit
with a detailed error message if it can't be allocated.
This can happen not only if the requested memory exceeds the available memory,
but also if it would would leave less than a few hundred kilobytes free, as
Exec won't allow it. It's safe to try though.
POSSIBLE APPLICATIONS
· Testing the behavior of programs under low memory conditions
· Testing disk-based virtual (swap) memory
· Simulating a µA1 w/256MB RAM on an XE with 512MB+
· Simulating a Classic Amiga w/128MB RAM on an A1
· Wasting memory for no good reason ;-)
I did my best to make sure that it won't cause any crash, however the OS may
become unstable if you allocate most of the free memory, leaving less than a
few megs available. I could have added some safeguards against that but it
would prevent testing such a scenario so I deliberately chose to allow it.
The original motivation behind writing that command was that some bug in the
BrowserII copy function prevents it from working unless the amount of free RAM
is below 256MB, and I wanted an alternative to copying 100MB+ of data to RAM:
to make it work.
Since then, Stephan Rupprecht wrote "AvailMemPatch" which took care of that
problem for all 68K apps. Thanks Stephan!
LICENSE
AllocMem is freeware.
HISTORY
1.2
- Added more detailed shell output
- Fixed a bug where it didn't check that AllocVecTags() actually succeeded but
still acted as if it had allocated the memory
1.1 (internal)
- Switched to AllocVecTags()
1.0
- First public release
--
Amiga... Duh! |
Contents of util/cli/AllocMem.lha PERMSSN UID GID PACKED SIZE RATIO METHOD CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic] 4404 5061 87.0% -lh5- 8eca Oct 14 2006 AllocMem.info
[generic] 1785 3760 47.5% -lh5- 86d6 Dec 18 01:55 AllocMem/AllocMem
[generic] 1245 2841 43.8% -lh5- 1168 Dec 18 01:55 AllocMem/AllocMem.c
[generic] 6083 9276 65.6% -lh5- a0de Oct 14 2006 AllocMem/AllocMem.c.info
[generic] 1199 2217 54.1% -lh5- 7448 Dec 18 02:33 AllocMem/AllocMem.readme
[generic] 4147 4920 84.3% -lh5- dc52 Oct 14 2006 AllocMem/AllocMem.readme.info
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 6 files 18863 28075 67.2% Dec 18 09:35
|
|
|
 |
Aminet © 1992-2008 Urban
Müller and
the Aminet team.
Aminet contact address: <aminet aminet net> |