Short: AllocP - BetterAlloc (AllocMem/AllocVec patch) V2.01 Author: thor@math.tu-berlin.de Uploader: thor math tu-berlin de Type: util/boot Version: 2.01 Architecture: m68k-amigaos (with the friendly permission of the original author, Andreas Kleinert) _____________________________________________________________________________ New in release 2.01: - Added a workarount for stupid "SaferPatches" clones. _____________________________________________________________________________ New in release 2.00: - Rewritten in assembly language, much shorter file - Tries a partial flush first, instead of removing all libraries on failure. - Removed unnecessary AllocVec patch since it calls AllocMem anyways. _____________________________________________________________________________ AllocP will be part of a major memory defragmentizer project still to be published, called PoolMem. Please stay tuned! _____________________________________________________________________________ Sometimes programs fail with a "not enough memory" error, but after calling "avail flush" the same operation does succeed without problems. If AllocMem routine in the ROMs did not find enough memory, it tries to flush disk based libraries and devices and, afterwards, tries again to reallocate the memory. However, due to a design flaw of the AllocMem() routine, this memory flushing does not have the desired result some- times - even though the libraries have been informed to remove themselves, the memory is not available directly afterwards. The AllocMem() call will fail anyways, EVEN THOUGH the requiested memory will be available immediatly after completion of AllocMem(). The reasons for this strange behaiviour are rather technical and explained below, for the interested user. This patch does ensure, that AllocMem/AllocVec won't fail unless there's really no memory available, even by flushing. This means: - less "out of memory" failures - less "bad behaviour" of bad programs, which don't check results of AllocMem/AllocVec - no more need to call "avail flush" by hand from the shell - thus no more "retry" operations after "avail flush" - no more unused libraries/devices consuming memory when it is already low Note: Works now for all operating systems and all CPUs, is no longer restricted to V37 or MC'20. Usage: Try starting in the Shell/CLI. If it does run stable, copy it into your C: directory and add it somewhere into your s:user-startup AllocP You use this patch at your own risk. No guarantee for anything. Source code in assembly language included, requires the DevPac assembler and my macro package at dev/asm/DvPkMacros.lha at the AmiNet. All mentioned trademarks are subject to their owners. _____________________________________________________________________________ The design flaw in AllocMem(): When looking closely at the ROM routine of AllocMem(), you'll notice that a memory flush is TRIED if t