Short: Optimize for better memory allocation Author: RhoSigma, Roland Heyder Uploader: Roland Heyder Type: util/boot Version: 4.200 (12.05.15) Architecture: m68k-amigaos >= 2.0.4 english: ¯¯¯¯¯¯¯¯ The MemOptimizer package is FREEWARE. The purpose of this program is to periodically check your Amiga's free memory list(s) and automatically remove all memory fragments (chunks) which are smaller than a given threshold value. This will optimize memory allocations, as the lists become shorter and hence can be searched faster. => In patched mode (recommended) the removed chunks remain available for allocations via the freestack system provided by the memoptimizer.library, which gives fast access to the memory, even if there are 100s of chunks on the freestack. => Because the small chunks remain available, the large memory blocks in the system's freelist are protected from further fragmentation, as small memory allocations are satisfied from the freestack. => Additional some calculations are made to express the current fragmentation in such kind of numbers, which allow to compare the effects of MemOptimizer and the regular values without it. => Different from PoolMem and TLSFMem, MemOptimizer has proven to run stable even with any PowerUp and/or WarpOS software. => See Docs/MemOpt.html for full installation/usage details, Docs/MoLib.html contains the developer documentation for the memoptimizer.library. => If you wrote software using any functions of the memoptimizer.library, then feel free to distribute a standalone copy of the library enclosed with your package, but please mention the MemOptimizer.lha archive as its source and Aminet util/boot as the place to go for download. Find all my Software on Aminet: ------------------------------- http://aminet.net/search?readme=rhosigma&sort=path deutsch: ¯¯¯¯¯¯¯¯ Das MemOptimizer Packet ist FREIWARE. Der Zweck dieses Programms ist der, periodisch die Speicherlisten deines Amiga's zu überprüfen und dabei automatisch alle Speicherfragmente (Chunks), welche kleiner als ein angegebener Schwellwert sind, zu entfernen. Dadurch werden Speicherreservierungen optimiert, da die Listen jetzt kürzer sind und daher schneller durchsucht werden können. => Im gepatchten Modus (empfohlen) bleiben die entfernten Speicherchunks aber weiterhin verfügbar über den von der memoptimizer.library bereitgestellten Speicherstapel. Die Verwaltung des gleichen erlaubt schnellen Zugriff auf den Speicher, selbst wenn sich 100te Chunks auf dem Stapel befinden. => Da die kleinen Speicherchunks verfügbar bleiben, sind außerdem die großen Speicherblöcke in den Systemspeicherlisten geschützt vor weiterer Fragmen- tierung, da kleinere Speicherreservierungen vom Speicherstapel genommen werden können. => Zusätzlich werden noch ein paar Berechnungen angestellt, um die jeweilige Fragmentierung in verständliche Zahlen zu fassen, damit man den Effekt von MemOptimizer auch mit den regulären Werten ohne diesen vergleichen kann. => Anders als PoolMem und TLSFMem, hat MemOptimizer auch ein zuverlässiges Laufzeitverhalten mit beliebiger PowerUp und/oder WarpOS Software bewiesen. => Siehe Docs/MemOpt.html für Installations- und Benutzungshinweise, darüber hinaus enthält Docs/MoLib.html auch die Entwicklerdokumentation für die memoptimizer.library. (Docs alle nur in englisch verfügbar.) => Wenn du Programme geschrieben hast, die irgendwelche Funktionen aus der memoptimizer.library benutzen, dann darfst du gerne eine Einzelkopie der Bibliothek deinem Programmpacket beilegen, aber bitte weise darauf hin, daß die Quelle das MemOptimizer.lha Archiv ist und dieses auf dem Aminet unter util/boot zum herunterladen bereit steht. Finde alle meine Software im Aminet: ------------------------------------ http://aminet.net/search?readme=rhosigma&sort=path =========================================================================== History: ¯¯¯¯¯¯¯¯ v1.000 (16.11.05) - initial Release - removes small memory chunks (by threshold) from exec's MemLists to speed up allocations - simple GUI to change shell given options and some statistic output v1.139 (20.05.06) - optional use of »memoptimizer.library« for further enhancement of memory allocations - statistic outputs in GUI now features combined numerical & graphical (gauge like) display v2.180 (30.06.06) - two new functions in »memoptimizer.library« added, see developer docs - freestack system improved for better internal function, it's almost self-maintaining now, so the removed chunk num/size displayed in the GUI should fall back to zero always within 1-2 loops (in patched mode), this avoids the unexpected flushes done when exceeding the given limit v3.013 (21.01.07) - general rework of the freestack system of the »memoptimizer.library«, it's now calculating to satisfy any allocations rather than searching through endless chunk lists - much faster - new patch for AvailMem() added to avoid fluctuation of any free memory displays/monitors reported in earlier versions, free size on stack will be added to free system size (according to given memory attributes) - low memory handler added if running under OS3.0+ (V39+) which will handle re-merge of chunks dynamicly as required by the system - special handling of MEMF_REVERSE allocations implemented, see docs for »MoReverseNames« CLI utility for more info - the mainprogram MemOptimizer was carefully »handoptimized« to hold most frequently used pointers/counters/variables in registers rather than on stack or small data segment - please read the docs, much new info added v3.056 (01.09.07) - optimizations in AvailMem()-Patch, will correctly handle MEMF_LARGEST for the freestack now, even if this is more theoretical, cause the largest block must be down below 4096 bytes to get a chance to satisfy the query with a block from the freestack, in most cases the system will probably refuse to work long time before you reach such a low memory situation - arithmetic overflow condition fixed in StackUsage() - MEMF_REVERSE fix in AllocRuntime(), was refused even if the calling task was allowed, if memory was taken from freestack (makes no sense here, cause memory chunks on freestack are unordered), now any allowed REVERSE allocations are put through to system's FreeList to make sure they're satified from the top of MemList - dangerous condition in ClearStack() fixed, a pointer was used after the memory it points to was already freed - as several people reported to me, MemOptimizer does also work fine under MorphOS, but you should run it in UNPATCHed mode, as it is not a wise idea to replace native PPC code with 68k routines v3.062 (10.09.07) - fixed all Enforcer/MuForce Hits, which were simply a side effect of a wrong branch, which finally caused operation on an NULL pointer - REVERSE name checks only performed now, if at least one name is in list, makes no sense to obtain the Task/Command name first, just to find out later, that there is no name in the list to compare it with - keeping the freestack entries sorted in ascending order now, which will result in somewhat faster flush operation v4.080 (21.03.10) - patches installed in SaferPatches (+similar) compatible way now - wrong branch instructions fixed for unsigned address checks - new library function - StackHitRate() - new patch + bugfix for AllocAbs() - new resource tracking functions implemented - new fast block clearing routines implemented (CPU sensitive) - general tuning to make library independent from master - improved Chunk recycling routines - ramlib/RAM check - load resources to upper memory area - logfile stuff and in-build GUI removed from master v4.092 (03.04.10) - just some improvements for MoMeter to feature more layouts and let the user save the current state/position v4.093 (20.12.10) - just a little improvement regarding priorities, after watching my system over several month now, I've adjusted the task, semaphore and low memory handler priorities of the master, library, GUI and MoMeter v4.153 (02.06.11) - [not published] - many tests and experiments to further improve the chunk recycling and resource tracking routines - project went out of focus because of immense lack of time v4.200 (12.05.15) - some more improvements in chunk recycling routines to allow for better re-merge behaviour with chunks in system's freelist - fixed an arithmetic overflow in fragmentation calculation - added DONOTWAIT and STARTPRI=-1 tooltypes to "SaveState" menu operation of MoMeter