Home » Archimedes archive » Acorn User » AU 1998-02 B.adf » JFShared » !JFShared/Help/HeapLib
!JFShared/Help/HeapLib
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1998-02 B.adf » JFShared |
Filename: | !JFShared/Help/HeapLib |
Read OK: | ✔ |
File size: | 17F4 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
HELP(�����,����$DIR$���G����Y�XPROC�G���3]אFN�G����Z@T6!Root�G����a@TinfoDIR$XXG����̩��release�F���b�MjinitheaphF���G��lockblock\F�����M�unlockblockF���q��M�heap_garbage�F�����M*heap_relocate�F��� �Mheap_oktomove F�����Nheap_reduce F���Bc4S�heap_freeDATA�PROCrelease(blk) #Parent !Root <= {/}ptr{/} block to release Release a claimed block within the Heap (using <FNclaim>) or RMA (using <FNclaimRMA>). Note: This call replaces the WimpLib RMA <PROCrelease=>WimpLib:PROCrelease> call. DATAjPROCinitheap #Parent !Root Initialises heap library variables. Call this routine at the start of any program that uses the HeapLib file. Initially, the relocatable block manager allocates only two handles, but this is automatically increased as required. The minimum size the heap can occupy is that of the page size, see the Machine manual for details.DATA�PROClockblock(pointer) #Parent !Root => {/}pointer{/} pointer to block Locks a relocatable block so that it is never passed to the <PROCheap_relocate> and will therefore remain in the same location until <unlocked=>PROCunlockblock>. DATA�PROCunlockblock(pointer) #Parent !Root => {/}pointer{/} pointer to block Unlocks a previously locked relocatable block so that it can be moved by <PROCheap_relocate>. DATA�PROCheap_garbage #Parent !Root This begins a section of garbage collection calls, used to reduce the size of the heap to its smallest possible size. Only relocatable blocks may be moved; all other blocks remain in the same location. If a block is required to move, then <PROCheap_relocate> will be called. It will then be up to the application to call <PROCheap_oktomove> to update it's pointers. If possible, the slot size will be reduced so that the minimum space is claimed, and the relocatable block index will be moved down the heap. Note: This call will not fully compact the heap. Due to the manner in which allocation of heap blocks is done many calls to PROCheap_garbage may be required. DATA*PROCheap_relocate(pointer,size) #Parent !Root => {/}pointer{/} pointer to block {/}size{/} size of block (internally used) This routine should exist in the main application to be called during <PROCheap_garbage> so that the applications internal pointers may be updated. To move the block, <PROCheap_oktomove> should be called. The code should be something like : #Indent 2 {fCode}DEFPROCheap_relocate(ptr,size) CASE ptr OF WHEN index:PROCheap_oktomove(index,size) etc. ENDCASE ENDPROC {f} #Indent If a group of pointers are used in an array, then the array should be searched for the pointer and it updated. Note: If the routine does not wish to move a block, then it need not call PROCheap_oktomove. Note: When a block is locked it's pointer will never be passed to PROCheap_relocate for moving.DATAPROCheap_oktomove(pointer,size) #Parent !Root => {/}pointer{/} pointer to block {/}size{/} size of block (internally used) \<= {/}pointer{/} updated with new location This routine should be called within <PROCheap_relocate> when a pointer requires updating.DATAPROCheap_reduce #Parent !Root This routine is the non-relocatable version of <PROCheap_garbage>. All free space at the end of the heap will be released to reduce the WimpSlot allocation as far as is possible. Note: This is automatically carried out by PROCheap_garbage.DATA�PROCheap_free(max,free) #Parent !Root <= {/}max{/} total size allocated to heap {/}free{/} amount of free space in heap This call is used to find the amount of free space in the heap.DIR$��tF����9_Neclaim�F������M�extend�F����w_N#claimRMA�G���XU@T�strdupDATAeFNclaim(size) - HeapLib vesion #Parent !Root => {/}size{/} size of block, or -ve size if relocatable <= pointer to block, or -1 if no room Claim a block within heap. Relocatable blocks may be moved by the <PROCheap_garbage> routine. Note: This call replaces the WimpLib RMA <FNclaim=>WimpLib:FNclaim> call. To claim an RMA block use <FNclaimRMA>. DATA�FNextend(pointer,size) #Parent !Root => {/}pointer{/} pointer to block {/}size{/} size to extend by, or -ve to reduce \<= pointer to block, with bit 0 set if could not claim Extends a previously claimed relocatable heap block. DATA#FNclaimRMA(size) #Parent !Root => {/}size{/} size of block <= pointer to block, or -1 if no room Claim a block of RMA. Note: This call is used in place of WimpLib <FNclaim=>WimpLib:FNclaim> when an RMA claim is required, as FNclaim will be caught by HeapLib to claim a Heap block. DATA�FNstrdup(text$) #Parent !Root => {/}text${/} string to copy <= pointer to block, or -1 if no room Claim a block within heap and store the string in it, returning it's pointer. DATA6HeapLib routines #Parent StrongHelp:!Menu #Table Columns 2 <PROCinitheap> <PROCheap_free> <FNclaimRMA> <FNclaim> <PROCrelease> <FNextend> <FNstrdup> <PROClockblock> <PROCunlockblock> <PROCheap_reduce> <PROCheap_garbage> <PROCheap_relocate> <PROCheap_oktomove> #EndTable <Information=>info> on HeapLib DATAHeapLib help #Align Centre {fh3}JFShared HeapLib v1.04{f} #Align Left The Heap Library is a Basic Library file which provides simple procedure calls to give control over memory management. In conjunction with the JFShared skeleton application and WimpLib this provides useful application memory management. This help file details the routines provided in HeapLib. The Heap Library is referenced by \<HeapLibrary$File> and should be loaded with : {fCode}LIBRARY "\<HeapLibrary$File>":PROCinitheap{f} The JFShared application is � <Justin Fletcher=>Filetypes:Authors_JustinFletcher>, 1996 and is released into the Public Domain with the same restrictions as subsist in most PD software. This includes the fact that when distributed the entire application must remain intact.
00000000 48 45 4c 50 28 00 00 00 fa 00 00 00 ff ff ff ff |HELP(...........| 00000010 2c 00 00 00 00 fd ff ff 00 00 00 00 80 00 00 00 |,...............| 00000020 00 01 00 00 00 00 00 00 24 00 00 00 44 49 52 24 |........$...DIR$| 00000030 88 00 00 00 88 00 00 00 b4 00 00 00 47 fd ff ff |............G...| 00000040 87 59 06 d7 58 01 00 00 13 01 00 00 00 00 00 00 |.Y..X...........| 00000050 50 52 4f 43 00 00 00 00 e4 0e 00 00 47 fd ff ff |PROC........G...| 00000060 33 5d 06 d7 90 00 00 00 13 01 00 00 00 00 00 00 |3]..............| 00000070 46 4e 00 00 ac 13 00 00 47 fd ff ff cb 5a 40 54 |FN......G....Z@T| 00000080 36 01 00 00 13 00 00 00 00 00 00 00 21 52 6f 6f |6...........!Roo| 00000090 74 00 00 00 e4 14 00 00 47 fd ff ff b3 61 40 54 |t.......G....a@T| 000000a0 10 03 00 00 13 00 00 00 00 00 00 00 69 6e 66 6f |............info| 000000b0 00 00 00 00 44 49 52 24 58 01 00 00 58 01 00 00 |....DIR$X...X...| 000000c0 0c 02 00 00 47 ff ff ff ac cc a9 b6 f0 00 00 00 |....G...........| 000000d0 13 00 00 00 00 00 00 00 72 65 6c 65 61 73 65 00 |........release.| 000000e0 fc 02 00 00 46 ff ff ff 62 0e e4 4d 6a 01 00 00 |....F...b..Mj...| 000000f0 13 00 00 00 00 00 00 00 69 6e 69 74 68 65 61 70 |........initheap| 00000100 00 00 00 00 68 04 00 00 46 ff ff ff 1e 47 ed a9 |....h...F....G..| 00000110 f2 00 00 00 13 00 00 00 00 00 00 00 6c 6f 63 6b |............lock| 00000120 62 6c 6f 63 6b 00 00 00 5c 05 00 00 46 ff ff ff |block...\...F...| 00000130 8e f4 fa 4d b0 00 00 00 13 00 00 00 00 00 00 00 |...M............| 00000140 75 6e 6c 6f 63 6b 62 6c 6f 63 6b 00 0c 06 00 00 |unlockblock.....| 00000150 46 ff ff ff 71 fc fa 4d c4 02 00 00 13 00 00 00 |F...q..M........| 00000160 00 00 00 00 68 65 61 70 5f 67 61 72 62 61 67 65 |....heap_garbage| 00000170 00 00 00 00 d0 08 00 00 46 ff ff ff ae 02 fb 4d |........F......M| 00000180 2a 03 00 00 13 00 00 00 00 00 00 00 68 65 61 70 |*...........heap| 00000190 5f 72 65 6c 6f 63 61 74 65 00 00 00 fc 0b 00 00 |_relocate.......| 000001a0 46 ff ff ff 20 0b fb 4d 0b 01 00 00 13 00 00 00 |F... ..M........| 000001b0 00 00 00 00 68 65 61 70 5f 6f 6b 74 6f 6d 6f 76 |....heap_oktomov| 000001c0 65 00 00 00 08 0d 00 00 46 ff ff ff 98 f1 03 4e |e.......F......N| 000001d0 16 01 00 00 13 00 00 00 00 00 00 00 68 65 61 70 |............heap| 000001e0 5f 72 65 64 75 63 65 00 20 0e 00 00 46 ff ff ff |_reduce. ...F...| 000001f0 42 63 34 53 c1 00 00 00 13 00 00 00 00 00 00 00 |Bc4S............| 00000200 68 65 61 70 5f 66 72 65 65 00 00 00 44 41 54 41 |heap_free...DATA| 00000210 f0 00 00 00 50 52 4f 43 72 65 6c 65 61 73 65 28 |....PROCrelease(| 00000220 62 6c 6b 29 0a 23 50 61 72 65 6e 74 20 21 52 6f |blk).#Parent !Ro| 00000230 6f 74 0a 3c 3d 09 7b 2f 7d 70 74 72 7b 2f 7d 09 |ot.<=.{/}ptr{/}.| 00000240 62 6c 6f 63 6b 20 74 6f 20 72 65 6c 65 61 73 65 |block to release| 00000250 0a 0a 52 65 6c 65 61 73 65 20 61 20 63 6c 61 69 |..Release a clai| 00000260 6d 65 64 20 62 6c 6f 63 6b 20 77 69 74 68 69 6e |med block within| 00000270 20 74 68 65 20 48 65 61 70 20 28 75 73 69 6e 67 | the Heap (using| 00000280 20 3c 46 4e 63 6c 61 69 6d 3e 29 20 6f 72 20 52 | <FNclaim>) or R| 00000290 4d 41 20 28 75 73 69 6e 67 20 3c 46 4e 63 6c 61 |MA (using <FNcla| 000002a0 69 6d 52 4d 41 3e 29 2e 0a 0a 4e 6f 74 65 3a 20 |imRMA>)...Note: | 000002b0 54 68 69 73 20 63 61 6c 6c 20 72 65 70 6c 61 63 |This call replac| 000002c0 65 73 20 74 68 65 20 57 69 6d 70 4c 69 62 20 52 |es the WimpLib R| 000002d0 4d 41 20 3c 50 52 4f 43 72 65 6c 65 61 73 65 3d |MA <PROCrelease=| 000002e0 3e 57 69 6d 70 4c 69 62 3a 50 52 4f 43 72 65 6c |>WimpLib:PROCrel| 000002f0 65 61 73 65 3e 20 63 61 6c 6c 2e 0a 44 41 54 41 |ease> call..DATA| 00000300 6a 01 00 00 50 52 4f 43 69 6e 69 74 68 65 61 70 |j...PROCinitheap| 00000310 0a 23 50 61 72 65 6e 74 20 21 52 6f 6f 74 0a 49 |.#Parent !Root.I| 00000320 6e 69 74 69 61 6c 69 73 65 73 20 68 65 61 70 20 |nitialises heap | 00000330 6c 69 62 72 61 72 79 20 76 61 72 69 61 62 6c 65 |library variable| 00000340 73 2e 0a 0a 43 61 6c 6c 20 74 68 69 73 20 72 6f |s...Call this ro| 00000350 75 74 69 6e 65 20 61 74 20 74 68 65 20 73 74 61 |utine at the sta| 00000360 72 74 20 6f 66 20 61 6e 79 20 70 72 6f 67 72 61 |rt of any progra| 00000370 6d 20 74 68 61 74 20 75 73 65 73 20 74 68 65 20 |m that uses the | 00000380 48 65 61 70 4c 69 62 20 66 69 6c 65 2e 20 49 6e |HeapLib file. In| 00000390 69 74 69 61 6c 6c 79 2c 20 74 68 65 20 72 65 6c |itially, the rel| 000003a0 6f 63 61 74 61 62 6c 65 20 62 6c 6f 63 6b 20 6d |ocatable block m| 000003b0 61 6e 61 67 65 72 20 61 6c 6c 6f 63 61 74 65 73 |anager allocates| 000003c0 20 6f 6e 6c 79 20 74 77 6f 20 68 61 6e 64 6c 65 | only two handle| 000003d0 73 2c 20 62 75 74 20 74 68 69 73 20 69 73 20 61 |s, but this is a| 000003e0 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 6e 63 |utomatically inc| 000003f0 72 65 61 73 65 64 20 61 73 20 72 65 71 75 69 72 |reased as requir| 00000400 65 64 2e 20 54 68 65 20 6d 69 6e 69 6d 75 6d 20 |ed. The minimum | 00000410 73 69 7a 65 20 74 68 65 20 68 65 61 70 20 63 61 |size the heap ca| 00000420 6e 20 6f 63 63 75 70 79 20 69 73 20 74 68 61 74 |n occupy is that| 00000430 20 6f 66 20 74 68 65 20 70 61 67 65 20 73 69 7a | of the page siz| 00000440 65 2c 20 73 65 65 20 74 68 65 20 4d 61 63 68 69 |e, see the Machi| 00000450 6e 65 20 6d 61 6e 75 61 6c 20 66 6f 72 20 64 65 |ne manual for de| 00000460 74 61 69 6c 73 2e 00 00 44 41 54 41 f2 00 00 00 |tails...DATA....| 00000470 50 52 4f 43 6c 6f 63 6b 62 6c 6f 63 6b 28 70 6f |PROClockblock(po| 00000480 69 6e 74 65 72 29 0a 23 50 61 72 65 6e 74 20 21 |inter).#Parent !| 00000490 52 6f 6f 74 0a 3d 3e 09 7b 2f 7d 70 6f 69 6e 74 |Root.=>.{/}point| 000004a0 65 72 7b 2f 7d 09 70 6f 69 6e 74 65 72 20 74 6f |er{/}.pointer to| 000004b0 20 62 6c 6f 63 6b 0a 0a 4c 6f 63 6b 73 20 61 20 | block..Locks a | 000004c0 72 65 6c 6f 63 61 74 61 62 6c 65 20 62 6c 6f 63 |relocatable bloc| 000004d0 6b 20 73 6f 20 74 68 61 74 20 69 74 20 69 73 20 |k so that it is | 000004e0 6e 65 76 65 72 20 70 61 73 73 65 64 20 74 6f 20 |never passed to | 000004f0 74 68 65 20 3c 50 52 4f 43 68 65 61 70 5f 72 65 |the <PROCheap_re| 00000500 6c 6f 63 61 74 65 3e 20 61 6e 64 20 77 69 6c 6c |locate> and will| 00000510 20 74 68 65 72 65 66 6f 72 65 20 72 65 6d 61 69 | therefore remai| 00000520 6e 20 69 6e 20 74 68 65 20 73 61 6d 65 20 6c 6f |n in the same lo| 00000530 63 61 74 69 6f 6e 20 75 6e 74 69 6c 20 3c 75 6e |cation until <un| 00000540 6c 6f 63 6b 65 64 3d 3e 50 52 4f 43 75 6e 6c 6f |locked=>PROCunlo| 00000550 63 6b 62 6c 6f 63 6b 3e 2e 0a 00 00 44 41 54 41 |ckblock>....DATA| 00000560 b0 00 00 00 50 52 4f 43 75 6e 6c 6f 63 6b 62 6c |....PROCunlockbl| 00000570 6f 63 6b 28 70 6f 69 6e 74 65 72 29 0a 23 50 61 |ock(pointer).#Pa| 00000580 72 65 6e 74 20 21 52 6f 6f 74 0a 3d 3e 09 7b 2f |rent !Root.=>.{/| 00000590 7d 70 6f 69 6e 74 65 72 7b 2f 7d 09 70 6f 69 6e |}pointer{/}.poin| 000005a0 74 65 72 20 74 6f 20 62 6c 6f 63 6b 0a 0a 55 6e |ter to block..Un| 000005b0 6c 6f 63 6b 73 20 61 20 70 72 65 76 69 6f 75 73 |locks a previous| 000005c0 6c 79 20 6c 6f 63 6b 65 64 20 72 65 6c 6f 63 61 |ly locked reloca| 000005d0 74 61 62 6c 65 20 62 6c 6f 63 6b 20 73 6f 20 74 |table block so t| 000005e0 68 61 74 20 69 74 20 63 61 6e 20 62 65 20 6d 6f |hat it can be mo| 000005f0 76 65 64 20 62 79 20 3c 50 52 4f 43 68 65 61 70 |ved by <PROCheap| 00000600 5f 72 65 6c 6f 63 61 74 65 3e 2e 0a 44 41 54 41 |_relocate>..DATA| 00000610 c4 02 00 00 50 52 4f 43 68 65 61 70 5f 67 61 72 |....PROCheap_gar| 00000620 62 61 67 65 0a 23 50 61 72 65 6e 74 20 21 52 6f |bage.#Parent !Ro| 00000630 6f 74 0a 54 68 69 73 20 62 65 67 69 6e 73 20 61 |ot.This begins a| 00000640 20 73 65 63 74 69 6f 6e 20 6f 66 20 67 61 72 62 | section of garb| 00000650 61 67 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 63 |age collection c| 00000660 61 6c 6c 73 2c 20 75 73 65 64 20 74 6f 20 72 65 |alls, used to re| 00000670 64 75 63 65 20 74 68 65 20 73 69 7a 65 20 6f 66 |duce the size of| 00000680 20 74 68 65 20 68 65 61 70 20 74 6f 20 69 74 73 | the heap to its| 00000690 20 73 6d 61 6c 6c 65 73 74 20 70 6f 73 73 69 62 | smallest possib| 000006a0 6c 65 20 73 69 7a 65 2e 0a 0a 4f 6e 6c 79 20 72 |le size...Only r| 000006b0 65 6c 6f 63 61 74 61 62 6c 65 20 62 6c 6f 63 6b |elocatable block| 000006c0 73 20 6d 61 79 20 62 65 20 6d 6f 76 65 64 3b 20 |s may be moved; | 000006d0 61 6c 6c 20 6f 74 68 65 72 20 62 6c 6f 63 6b 73 |all other blocks| 000006e0 20 72 65 6d 61 69 6e 20 69 6e 20 74 68 65 20 73 | remain in the s| 000006f0 61 6d 65 20 6c 6f 63 61 74 69 6f 6e 2e 20 49 66 |ame location. If| 00000700 20 61 20 62 6c 6f 63 6b 20 69 73 20 72 65 71 75 | a block is requ| 00000710 69 72 65 64 20 74 6f 20 6d 6f 76 65 2c 20 74 68 |ired to move, th| 00000720 65 6e 20 3c 50 52 4f 43 68 65 61 70 5f 72 65 6c |en <PROCheap_rel| 00000730 6f 63 61 74 65 3e 20 77 69 6c 6c 20 62 65 20 63 |ocate> will be c| 00000740 61 6c 6c 65 64 2e 20 49 74 20 77 69 6c 6c 20 74 |alled. It will t| 00000750 68 65 6e 20 62 65 20 75 70 20 74 6f 20 74 68 65 |hen be up to the| 00000760 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 74 6f 20 | application to | 00000770 63 61 6c 6c 20 3c 50 52 4f 43 68 65 61 70 5f 6f |call <PROCheap_o| 00000780 6b 74 6f 6d 6f 76 65 3e 20 74 6f 20 75 70 64 61 |ktomove> to upda| 00000790 74 65 20 69 74 27 73 20 70 6f 69 6e 74 65 72 73 |te it's pointers| 000007a0 2e 0a 0a 49 66 20 70 6f 73 73 69 62 6c 65 2c 20 |...If possible, | 000007b0 74 68 65 20 73 6c 6f 74 20 73 69 7a 65 20 77 69 |the slot size wi| 000007c0 6c 6c 20 62 65 20 72 65 64 75 63 65 64 20 73 6f |ll be reduced so| 000007d0 20 74 68 61 74 20 74 68 65 20 6d 69 6e 69 6d 75 | that the minimu| 000007e0 6d 20 73 70 61 63 65 20 69 73 20 63 6c 61 69 6d |m space is claim| 000007f0 65 64 2c 20 61 6e 64 20 74 68 65 20 72 65 6c 6f |ed, and the relo| 00000800 63 61 74 61 62 6c 65 20 62 6c 6f 63 6b 20 69 6e |catable block in| 00000810 64 65 78 20 77 69 6c 6c 20 62 65 20 6d 6f 76 65 |dex will be move| 00000820 64 20 64 6f 77 6e 20 74 68 65 20 68 65 61 70 2e |d down the heap.| 00000830 0a 0a 4e 6f 74 65 3a 20 54 68 69 73 20 63 61 6c |..Note: This cal| 00000840 6c 20 77 69 6c 6c 20 6e 6f 74 20 66 75 6c 6c 79 |l will not fully| 00000850 20 63 6f 6d 70 61 63 74 20 74 68 65 20 68 65 61 | compact the hea| 00000860 70 2e 20 44 75 65 20 74 6f 20 74 68 65 20 6d 61 |p. Due to the ma| 00000870 6e 6e 65 72 20 69 6e 20 77 68 69 63 68 20 61 6c |nner in which al| 00000880 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 68 65 61 70 |location of heap| 00000890 20 62 6c 6f 63 6b 73 20 69 73 20 64 6f 6e 65 20 | blocks is done | 000008a0 6d 61 6e 79 20 63 61 6c 6c 73 20 74 6f 20 50 52 |many calls to PR| 000008b0 4f 43 68 65 61 70 5f 67 61 72 62 61 67 65 20 6d |OCheap_garbage m| 000008c0 61 79 20 62 65 20 72 65 71 75 69 72 65 64 2e 0a |ay be required..| 000008d0 44 41 54 41 2a 03 00 00 50 52 4f 43 68 65 61 70 |DATA*...PROCheap| 000008e0 5f 72 65 6c 6f 63 61 74 65 28 70 6f 69 6e 74 65 |_relocate(pointe| 000008f0 72 2c 73 69 7a 65 29 0a 23 50 61 72 65 6e 74 20 |r,size).#Parent | 00000900 21 52 6f 6f 74 0a 3d 3e 09 7b 2f 7d 70 6f 69 6e |!Root.=>.{/}poin| 00000910 74 65 72 7b 2f 7d 09 70 6f 69 6e 74 65 72 20 74 |ter{/}.pointer t| 00000920 6f 20 62 6c 6f 63 6b 0a 09 7b 2f 7d 73 69 7a 65 |o block..{/}size| 00000930 7b 2f 7d 09 73 69 7a 65 20 6f 66 20 62 6c 6f 63 |{/}.size of bloc| 00000940 6b 20 28 69 6e 74 65 72 6e 61 6c 6c 79 20 75 73 |k (internally us| 00000950 65 64 29 0a 0a 54 68 69 73 20 72 6f 75 74 69 6e |ed)..This routin| 00000960 65 20 73 68 6f 75 6c 64 20 65 78 69 73 74 20 69 |e should exist i| 00000970 6e 20 74 68 65 20 6d 61 69 6e 20 61 70 70 6c 69 |n the main appli| 00000980 63 61 74 69 6f 6e 20 74 6f 20 62 65 20 63 61 6c |cation to be cal| 00000990 6c 65 64 20 64 75 72 69 6e 67 20 3c 50 52 4f 43 |led during <PROC| 000009a0 68 65 61 70 5f 67 61 72 62 61 67 65 3e 20 73 6f |heap_garbage> so| 000009b0 20 74 68 61 74 20 74 68 65 20 61 70 70 6c 69 63 | that the applic| 000009c0 61 74 69 6f 6e 73 20 69 6e 74 65 72 6e 61 6c 20 |ations internal | 000009d0 70 6f 69 6e 74 65 72 73 20 6d 61 79 20 62 65 20 |pointers may be | 000009e0 75 70 64 61 74 65 64 2e 20 54 6f 20 6d 6f 76 65 |updated. To move| 000009f0 20 74 68 65 20 62 6c 6f 63 6b 2c 20 3c 50 52 4f | the block, <PRO| 00000a00 43 68 65 61 70 5f 6f 6b 74 6f 6d 6f 76 65 3e 20 |Cheap_oktomove> | 00000a10 73 68 6f 75 6c 64 20 62 65 20 63 61 6c 6c 65 64 |should be called| 00000a20 2e 20 54 68 65 20 63 6f 64 65 20 73 68 6f 75 6c |. The code shoul| 00000a30 64 20 62 65 20 73 6f 6d 65 74 68 69 6e 67 20 6c |d be something l| 00000a40 69 6b 65 20 3a 0a 23 49 6e 64 65 6e 74 20 32 0a |ike :.#Indent 2.| 00000a50 7b 66 43 6f 64 65 7d 44 45 46 50 52 4f 43 68 65 |{fCode}DEFPROChe| 00000a60 61 70 5f 72 65 6c 6f 63 61 74 65 28 70 74 72 2c |ap_relocate(ptr,| 00000a70 73 69 7a 65 29 0a 43 41 53 45 20 70 74 72 20 4f |size).CASE ptr O| 00000a80 46 0a 20 57 48 45 4e 20 69 6e 64 65 78 3a 50 52 |F. WHEN index:PR| 00000a90 4f 43 68 65 61 70 5f 6f 6b 74 6f 6d 6f 76 65 28 |OCheap_oktomove(| 00000aa0 69 6e 64 65 78 2c 73 69 7a 65 29 0a 20 65 74 63 |index,size). etc| 00000ab0 2e 0a 45 4e 44 43 41 53 45 0a 45 4e 44 50 52 4f |..ENDCASE.ENDPRO| 00000ac0 43 0a 7b 66 7d 0a 23 49 6e 64 65 6e 74 0a 49 66 |C.{f}.#Indent.If| 00000ad0 20 61 20 67 72 6f 75 70 20 6f 66 20 70 6f 69 6e | a group of poin| 00000ae0 74 65 72 73 20 61 72 65 20 75 73 65 64 20 69 6e |ters are used in| 00000af0 20 61 6e 20 61 72 72 61 79 2c 20 74 68 65 6e 20 | an array, then | 00000b00 74 68 65 20 61 72 72 61 79 20 73 68 6f 75 6c 64 |the array should| 00000b10 20 62 65 20 73 65 61 72 63 68 65 64 20 66 6f 72 | be searched for| 00000b20 20 74 68 65 20 70 6f 69 6e 74 65 72 20 61 6e 64 | the pointer and| 00000b30 20 69 74 20 75 70 64 61 74 65 64 2e 0a 0a 4e 6f | it updated...No| 00000b40 74 65 3a 09 49 66 20 74 68 65 20 72 6f 75 74 69 |te:.If the routi| 00000b50 6e 65 20 64 6f 65 73 20 6e 6f 74 20 77 69 73 68 |ne does not wish| 00000b60 20 74 6f 20 6d 6f 76 65 20 61 20 62 6c 6f 63 6b | to move a block| 00000b70 2c 20 74 68 65 6e 20 69 74 20 6e 65 65 64 20 6e |, then it need n| 00000b80 6f 74 20 63 61 6c 6c 20 50 52 4f 43 68 65 61 70 |ot call PROCheap| 00000b90 5f 6f 6b 74 6f 6d 6f 76 65 2e 0a 4e 6f 74 65 3a |_oktomove..Note:| 00000ba0 09 57 68 65 6e 20 61 20 62 6c 6f 63 6b 20 69 73 |.When a block is| 00000bb0 20 6c 6f 63 6b 65 64 20 69 74 27 73 20 70 6f 69 | locked it's poi| 00000bc0 6e 74 65 72 20 77 69 6c 6c 20 6e 65 76 65 72 20 |nter will never | 00000bd0 62 65 20 70 61 73 73 65 64 20 74 6f 20 50 52 4f |be passed to PRO| 00000be0 43 68 65 61 70 5f 72 65 6c 6f 63 61 74 65 20 66 |Cheap_relocate f| 00000bf0 6f 72 20 6d 6f 76 69 6e 67 2e 00 00 44 41 54 41 |or moving...DATA| 00000c00 0b 01 00 00 50 52 4f 43 68 65 61 70 5f 6f 6b 74 |....PROCheap_okt| 00000c10 6f 6d 6f 76 65 28 70 6f 69 6e 74 65 72 2c 73 69 |omove(pointer,si| 00000c20 7a 65 29 0a 23 50 61 72 65 6e 74 20 21 52 6f 6f |ze).#Parent !Roo| 00000c30 74 0a 3d 3e 09 7b 2f 7d 70 6f 69 6e 74 65 72 7b |t.=>.{/}pointer{| 00000c40 2f 7d 09 70 6f 69 6e 74 65 72 20 74 6f 20 62 6c |/}.pointer to bl| 00000c50 6f 63 6b 0a 09 7b 2f 7d 73 69 7a 65 7b 2f 7d 09 |ock..{/}size{/}.| 00000c60 73 69 7a 65 20 6f 66 20 62 6c 6f 63 6b 20 28 69 |size of block (i| 00000c70 6e 74 65 72 6e 61 6c 6c 79 20 75 73 65 64 29 0a |nternally used).| 00000c80 5c 3c 3d 09 7b 2f 7d 70 6f 69 6e 74 65 72 7b 2f |\<=.{/}pointer{/| 00000c90 7d 20 75 70 64 61 74 65 64 20 77 69 74 68 20 6e |} updated with n| 00000ca0 65 77 20 6c 6f 63 61 74 69 6f 6e 0a 0a 54 68 69 |ew location..Thi| 00000cb0 73 20 72 6f 75 74 69 6e 65 20 73 68 6f 75 6c 64 |s routine should| 00000cc0 20 62 65 20 63 61 6c 6c 65 64 20 77 69 74 68 69 | be called withi| 00000cd0 6e 20 3c 50 52 4f 43 68 65 61 70 5f 72 65 6c 6f |n <PROCheap_relo| 00000ce0 63 61 74 65 3e 20 77 68 65 6e 20 61 20 70 6f 69 |cate> when a poi| 00000cf0 6e 74 65 72 20 72 65 71 75 69 72 65 73 20 75 70 |nter requires up| 00000d00 64 61 74 69 6e 67 2e 00 44 41 54 41 16 01 00 00 |dating..DATA....| 00000d10 50 52 4f 43 68 65 61 70 5f 72 65 64 75 63 65 0a |PROCheap_reduce.| 00000d20 23 50 61 72 65 6e 74 20 21 52 6f 6f 74 0a 54 68 |#Parent !Root.Th| 00000d30 69 73 20 72 6f 75 74 69 6e 65 20 69 73 20 74 68 |is routine is th| 00000d40 65 20 6e 6f 6e 2d 72 65 6c 6f 63 61 74 61 62 6c |e non-relocatabl| 00000d50 65 20 76 65 72 73 69 6f 6e 20 6f 66 20 3c 50 52 |e version of <PR| 00000d60 4f 43 68 65 61 70 5f 67 61 72 62 61 67 65 3e 2e |OCheap_garbage>.| 00000d70 20 41 6c 6c 20 66 72 65 65 20 73 70 61 63 65 20 | All free space | 00000d80 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 |at the end of th| 00000d90 65 20 68 65 61 70 20 77 69 6c 6c 20 62 65 20 72 |e heap will be r| 00000da0 65 6c 65 61 73 65 64 20 74 6f 20 72 65 64 75 63 |eleased to reduc| 00000db0 65 20 74 68 65 20 57 69 6d 70 53 6c 6f 74 20 61 |e the WimpSlot a| 00000dc0 6c 6c 6f 63 61 74 69 6f 6e 20 61 73 20 66 61 72 |llocation as far| 00000dd0 20 61 73 20 69 73 20 70 6f 73 73 69 62 6c 65 2e | as is possible.| 00000de0 0a 0a 4e 6f 74 65 3a 20 54 68 69 73 20 69 73 20 |..Note: This is | 00000df0 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 63 61 |automatically ca| 00000e00 72 72 69 65 64 20 6f 75 74 20 62 79 20 50 52 4f |rried out by PRO| 00000e10 43 68 65 61 70 5f 67 61 72 62 61 67 65 2e 00 00 |Cheap_garbage...| 00000e20 44 41 54 41 c1 00 00 00 50 52 4f 43 68 65 61 70 |DATA....PROCheap| 00000e30 5f 66 72 65 65 28 6d 61 78 2c 66 72 65 65 29 0a |_free(max,free).| 00000e40 23 50 61 72 65 6e 74 20 21 52 6f 6f 74 0a 3c 3d |#Parent !Root.<=| 00000e50 09 7b 2f 7d 6d 61 78 7b 2f 7d 09 74 6f 74 61 6c |.{/}max{/}.total| 00000e60 20 73 69 7a 65 20 61 6c 6c 6f 63 61 74 65 64 20 | size allocated | 00000e70 74 6f 20 68 65 61 70 0a 09 7b 2f 7d 66 72 65 65 |to heap..{/}free| 00000e80 7b 2f 7d 09 61 6d 6f 75 6e 74 20 6f 66 20 66 72 |{/}.amount of fr| 00000e90 65 65 20 73 70 61 63 65 20 69 6e 20 68 65 61 70 |ee space in heap| 00000ea0 0a 0a 54 68 69 73 20 63 61 6c 6c 20 69 73 20 75 |..This call is u| 00000eb0 73 65 64 20 74 6f 20 66 69 6e 64 20 74 68 65 20 |sed to find the | 00000ec0 61 6d 6f 75 6e 74 20 6f 66 20 66 72 65 65 20 73 |amount of free s| 00000ed0 70 61 63 65 20 69 6e 20 74 68 65 20 68 65 61 70 |pace in the heap| 00000ee0 2e 00 00 00 44 49 52 24 90 00 00 00 90 00 00 00 |....DIR$........| 00000ef0 74 0f 00 00 46 ff ff ff fc 39 5f 4e 65 01 00 00 |t...F....9_Ne...| 00000f00 13 00 00 00 00 00 00 00 63 6c 61 69 6d 00 00 00 |........claim...| 00000f10 dc 10 00 00 46 ff ff ff 8d f8 fa 4d ed 00 00 00 |....F......M....| 00000f20 13 00 00 00 00 00 00 00 65 78 74 65 6e 64 00 00 |........extend..| 00000f30 cc 11 00 00 46 ff ff ff f9 77 5f 4e 23 01 00 00 |....F....w_N#...| 00000f40 13 00 00 00 00 00 00 00 63 6c 61 69 6d 52 4d 41 |........claimRMA| 00000f50 00 00 00 00 f0 12 00 00 47 ff ff ff 58 55 40 54 |........G...XU@T| 00000f60 b9 00 00 00 13 00 00 00 00 00 00 00 73 74 72 64 |............strd| 00000f70 75 70 00 00 44 41 54 41 65 01 00 00 46 4e 63 6c |up..DATAe...FNcl| 00000f80 61 69 6d 28 73 69 7a 65 29 20 2d 20 48 65 61 70 |aim(size) - Heap| 00000f90 4c 69 62 20 76 65 73 69 6f 6e 0a 23 50 61 72 65 |Lib vesion.#Pare| 00000fa0 6e 74 20 21 52 6f 6f 74 0a 3d 3e 09 7b 2f 7d 73 |nt !Root.=>.{/}s| 00000fb0 69 7a 65 7b 2f 7d 09 73 69 7a 65 20 6f 66 20 62 |ize{/}.size of b| 00000fc0 6c 6f 63 6b 2c 20 6f 72 20 2d 76 65 20 73 69 7a |lock, or -ve siz| 00000fd0 65 20 69 66 20 72 65 6c 6f 63 61 74 61 62 6c 65 |e if relocatable| 00000fe0 0a 3c 3d 09 70 6f 69 6e 74 65 72 20 74 6f 20 62 |.<=.pointer to b| 00000ff0 6c 6f 63 6b 2c 20 6f 72 20 2d 31 20 69 66 20 6e |lock, or -1 if n| 00001000 6f 20 72 6f 6f 6d 0a 0a 43 6c 61 69 6d 20 61 20 |o room..Claim a | 00001010 62 6c 6f 63 6b 20 77 69 74 68 69 6e 20 68 65 61 |block within hea| 00001020 70 2e 20 52 65 6c 6f 63 61 74 61 62 6c 65 20 62 |p. Relocatable b| 00001030 6c 6f 63 6b 73 20 6d 61 79 20 62 65 20 6d 6f 76 |locks may be mov| 00001040 65 64 20 62 79 20 74 68 65 20 3c 50 52 4f 43 68 |ed by the <PROCh| 00001050 65 61 70 5f 67 61 72 62 61 67 65 3e 20 72 6f 75 |eap_garbage> rou| 00001060 74 69 6e 65 2e 0a 0a 4e 6f 74 65 3a 20 54 68 69 |tine...Note: Thi| 00001070 73 20 63 61 6c 6c 20 72 65 70 6c 61 63 65 73 20 |s call replaces | 00001080 74 68 65 20 57 69 6d 70 4c 69 62 20 52 4d 41 20 |the WimpLib RMA | 00001090 3c 46 4e 63 6c 61 69 6d 3d 3e 57 69 6d 70 4c 69 |<FNclaim=>WimpLi| 000010a0 62 3a 46 4e 63 6c 61 69 6d 3e 20 63 61 6c 6c 2e |b:FNclaim> call.| 000010b0 20 54 6f 20 63 6c 61 69 6d 20 61 6e 20 52 4d 41 | To claim an RMA| 000010c0 20 62 6c 6f 63 6b 20 75 73 65 20 3c 46 4e 63 6c | block use <FNcl| 000010d0 61 69 6d 52 4d 41 3e 2e 0a 00 00 00 44 41 54 41 |aimRMA>.....DATA| 000010e0 ed 00 00 00 46 4e 65 78 74 65 6e 64 28 70 6f 69 |....FNextend(poi| 000010f0 6e 74 65 72 2c 73 69 7a 65 29 0a 23 50 61 72 65 |nter,size).#Pare| 00001100 6e 74 20 21 52 6f 6f 74 0a 3d 3e 09 7b 2f 7d 70 |nt !Root.=>.{/}p| 00001110 6f 69 6e 74 65 72 7b 2f 7d 09 70 6f 69 6e 74 65 |ointer{/}.pointe| 00001120 72 20 74 6f 20 62 6c 6f 63 6b 0a 09 7b 2f 7d 73 |r to block..{/}s| 00001130 69 7a 65 7b 2f 7d 09 73 69 7a 65 20 74 6f 20 65 |ize{/}.size to e| 00001140 78 74 65 6e 64 20 62 79 2c 20 6f 72 20 2d 76 65 |xtend by, or -ve| 00001150 20 74 6f 20 72 65 64 75 63 65 0a 5c 3c 3d 09 70 | to reduce.\<=.p| 00001160 6f 69 6e 74 65 72 20 74 6f 20 62 6c 6f 63 6b 2c |ointer to block,| 00001170 20 77 69 74 68 20 62 69 74 20 30 20 73 65 74 20 | with bit 0 set | 00001180 69 66 20 63 6f 75 6c 64 20 6e 6f 74 20 63 6c 61 |if could not cla| 00001190 69 6d 0a 0a 45 78 74 65 6e 64 73 20 61 20 70 72 |im..Extends a pr| 000011a0 65 76 69 6f 75 73 6c 79 20 63 6c 61 69 6d 65 64 |eviously claimed| 000011b0 20 72 65 6c 6f 63 61 74 61 62 6c 65 20 68 65 61 | relocatable hea| 000011c0 70 20 62 6c 6f 63 6b 2e 0a 00 00 00 44 41 54 41 |p block.....DATA| 000011d0 23 01 00 00 46 4e 63 6c 61 69 6d 52 4d 41 28 73 |#...FNclaimRMA(s| 000011e0 69 7a 65 29 0a 23 50 61 72 65 6e 74 20 21 52 6f |ize).#Parent !Ro| 000011f0 6f 74 0a 3d 3e 09 7b 2f 7d 73 69 7a 65 7b 2f 7d |ot.=>.{/}size{/}| 00001200 09 73 69 7a 65 20 6f 66 20 62 6c 6f 63 6b 0a 3c |.size of block.<| 00001210 3d 09 70 6f 69 6e 74 65 72 20 74 6f 20 62 6c 6f |=.pointer to blo| 00001220 63 6b 2c 20 6f 72 20 2d 31 20 69 66 20 6e 6f 20 |ck, or -1 if no | 00001230 72 6f 6f 6d 0a 0a 43 6c 61 69 6d 20 61 20 62 6c |room..Claim a bl| 00001240 6f 63 6b 20 6f 66 20 52 4d 41 2e 0a 0a 4e 6f 74 |ock of RMA...Not| 00001250 65 3a 20 54 68 69 73 20 63 61 6c 6c 20 69 73 20 |e: This call is | 00001260 75 73 65 64 20 69 6e 20 70 6c 61 63 65 20 6f 66 |used in place of| 00001270 20 57 69 6d 70 4c 69 62 20 3c 46 4e 63 6c 61 69 | WimpLib <FNclai| 00001280 6d 3d 3e 57 69 6d 70 4c 69 62 3a 46 4e 63 6c 61 |m=>WimpLib:FNcla| 00001290 69 6d 3e 20 77 68 65 6e 20 61 6e 20 52 4d 41 20 |im> when an RMA | 000012a0 63 6c 61 69 6d 20 69 73 20 72 65 71 75 69 72 65 |claim is require| 000012b0 64 2c 20 61 73 20 46 4e 63 6c 61 69 6d 20 77 69 |d, as FNclaim wi| 000012c0 6c 6c 20 62 65 20 63 61 75 67 68 74 20 62 79 20 |ll be caught by | 000012d0 48 65 61 70 4c 69 62 20 74 6f 20 63 6c 61 69 6d |HeapLib to claim| 000012e0 20 61 20 48 65 61 70 20 62 6c 6f 63 6b 2e 0a 00 | a Heap block...| 000012f0 44 41 54 41 b9 00 00 00 46 4e 73 74 72 64 75 70 |DATA....FNstrdup| 00001300 28 74 65 78 74 24 29 0a 23 50 61 72 65 6e 74 20 |(text$).#Parent | 00001310 21 52 6f 6f 74 0a 3d 3e 09 7b 2f 7d 74 65 78 74 |!Root.=>.{/}text| 00001320 24 7b 2f 7d 09 73 74 72 69 6e 67 20 74 6f 20 63 |${/}.string to c| 00001330 6f 70 79 0a 3c 3d 09 70 6f 69 6e 74 65 72 20 74 |opy.<=.pointer t| 00001340 6f 20 62 6c 6f 63 6b 2c 20 6f 72 20 2d 31 20 69 |o block, or -1 i| 00001350 66 20 6e 6f 20 72 6f 6f 6d 0a 0a 43 6c 61 69 6d |f no room..Claim| 00001360 20 61 20 62 6c 6f 63 6b 20 77 69 74 68 69 6e 20 | a block within | 00001370 68 65 61 70 20 61 6e 64 20 73 74 6f 72 65 20 74 |heap and store t| 00001380 68 65 20 73 74 72 69 6e 67 20 69 6e 20 69 74 2c |he string in it,| 00001390 20 72 65 74 75 72 6e 69 6e 67 20 69 74 27 73 20 | returning it's | 000013a0 70 6f 69 6e 74 65 72 2e 0a 00 00 00 44 41 54 41 |pointer.....DATA| 000013b0 36 01 00 00 48 65 61 70 4c 69 62 20 72 6f 75 74 |6...HeapLib rout| 000013c0 69 6e 65 73 0a 23 50 61 72 65 6e 74 20 53 74 72 |ines.#Parent Str| 000013d0 6f 6e 67 48 65 6c 70 3a 21 4d 65 6e 75 0a 23 54 |ongHelp:!Menu.#T| 000013e0 61 62 6c 65 20 43 6f 6c 75 6d 6e 73 20 32 0a 3c |able Columns 2.<| 000013f0 50 52 4f 43 69 6e 69 74 68 65 61 70 3e 0a 3c 50 |PROCinitheap>.<P| 00001400 52 4f 43 68 65 61 70 5f 66 72 65 65 3e 0a 3c 46 |ROCheap_free>.<F| 00001410 4e 63 6c 61 69 6d 52 4d 41 3e 0a 3c 46 4e 63 6c |NclaimRMA>.<FNcl| 00001420 61 69 6d 3e 0a 3c 50 52 4f 43 72 65 6c 65 61 73 |aim>.<PROCreleas| 00001430 65 3e 0a 3c 46 4e 65 78 74 65 6e 64 3e 0a 3c 46 |e>.<FNextend>.<F| 00001440 4e 73 74 72 64 75 70 3e 0a 3c 50 52 4f 43 6c 6f |Nstrdup>.<PROClo| 00001450 63 6b 62 6c 6f 63 6b 3e 0a 3c 50 52 4f 43 75 6e |ckblock>.<PROCun| 00001460 6c 6f 63 6b 62 6c 6f 63 6b 3e 0a 3c 50 52 4f 43 |lockblock>.<PROC| 00001470 68 65 61 70 5f 72 65 64 75 63 65 3e 0a 3c 50 52 |heap_reduce>.<PR| 00001480 4f 43 68 65 61 70 5f 67 61 72 62 61 67 65 3e 0a |OCheap_garbage>.| 00001490 3c 50 52 4f 43 68 65 61 70 5f 72 65 6c 6f 63 61 |<PROCheap_reloca| 000014a0 74 65 3e 0a 3c 50 52 4f 43 68 65 61 70 5f 6f 6b |te>.<PROCheap_ok| 000014b0 74 6f 6d 6f 76 65 3e 0a 23 45 6e 64 54 61 62 6c |tomove>.#EndTabl| 000014c0 65 0a 0a 3c 49 6e 66 6f 72 6d 61 74 69 6f 6e 3d |e..<Information=| 000014d0 3e 69 6e 66 6f 3e 20 6f 6e 20 48 65 61 70 4c 69 |>info> on HeapLi| 000014e0 62 0a 00 00 44 41 54 41 10 03 00 00 48 65 61 70 |b...DATA....Heap| 000014f0 4c 69 62 20 68 65 6c 70 0a 23 41 6c 69 67 6e 20 |Lib help.#Align | 00001500 43 65 6e 74 72 65 0a 7b 66 68 33 7d 4a 46 53 68 |Centre.{fh3}JFSh| 00001510 61 72 65 64 20 48 65 61 70 4c 69 62 20 76 31 2e |ared HeapLib v1.| 00001520 30 34 7b 66 7d 0a 23 41 6c 69 67 6e 20 4c 65 66 |04{f}.#Align Lef| 00001530 74 0a 0a 54 68 65 20 48 65 61 70 20 4c 69 62 72 |t..The Heap Libr| 00001540 61 72 79 20 69 73 20 61 20 42 61 73 69 63 20 4c |ary is a Basic L| 00001550 69 62 72 61 72 79 20 66 69 6c 65 20 77 68 69 63 |ibrary file whic| 00001560 68 20 70 72 6f 76 69 64 65 73 20 73 69 6d 70 6c |h provides simpl| 00001570 65 20 70 72 6f 63 65 64 75 72 65 20 63 61 6c 6c |e procedure call| 00001580 73 20 74 6f 20 67 69 76 65 20 63 6f 6e 74 72 6f |s to give contro| 00001590 6c 20 6f 76 65 72 20 6d 65 6d 6f 72 79 20 6d 61 |l over memory ma| 000015a0 6e 61 67 65 6d 65 6e 74 2e 20 49 6e 20 63 6f 6e |nagement. In con| 000015b0 6a 75 6e 63 74 69 6f 6e 20 77 69 74 68 20 74 68 |junction with th| 000015c0 65 20 4a 46 53 68 61 72 65 64 20 73 6b 65 6c 65 |e JFShared skele| 000015d0 74 6f 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 |ton application | 000015e0 61 6e 64 20 57 69 6d 70 4c 69 62 20 74 68 69 73 |and WimpLib this| 000015f0 20 70 72 6f 76 69 64 65 73 20 75 73 65 66 75 6c | provides useful| 00001600 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 6d 65 6d | application mem| 00001610 6f 72 79 20 6d 61 6e 61 67 65 6d 65 6e 74 2e 20 |ory management. | 00001620 54 68 69 73 20 68 65 6c 70 20 66 69 6c 65 20 64 |This help file d| 00001630 65 74 61 69 6c 73 20 74 68 65 20 72 6f 75 74 69 |etails the routi| 00001640 6e 65 73 20 70 72 6f 76 69 64 65 64 20 69 6e 20 |nes provided in | 00001650 48 65 61 70 4c 69 62 2e 0a 0a 54 68 65 20 48 65 |HeapLib...The He| 00001660 61 70 20 4c 69 62 72 61 72 79 20 69 73 20 72 65 |ap Library is re| 00001670 66 65 72 65 6e 63 65 64 20 62 79 20 5c 3c 48 65 |ferenced by \<He| 00001680 61 70 4c 69 62 72 61 72 79 24 46 69 6c 65 3e 20 |apLibrary$File> | 00001690 61 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 6c 6f |and should be lo| 000016a0 61 64 65 64 20 77 69 74 68 20 3a 0a 7b 66 43 6f |aded with :.{fCo| 000016b0 64 65 7d 4c 49 42 52 41 52 59 20 22 5c 3c 48 65 |de}LIBRARY "\<He| 000016c0 61 70 4c 69 62 72 61 72 79 24 46 69 6c 65 3e 22 |apLibrary$File>"| 000016d0 3a 50 52 4f 43 69 6e 69 74 68 65 61 70 7b 66 7d |:PROCinitheap{f}| 000016e0 0a 0a 54 68 65 20 4a 46 53 68 61 72 65 64 20 61 |..The JFShared a| 000016f0 70 70 6c 69 63 61 74 69 6f 6e 20 69 73 20 a9 20 |pplication is . | 00001700 3c 4a 75 73 74 69 6e 20 46 6c 65 74 63 68 65 72 |<Justin Fletcher| 00001710 3d 3e 46 69 6c 65 74 79 70 65 73 3a 41 75 74 68 |=>Filetypes:Auth| 00001720 6f 72 73 5f 4a 75 73 74 69 6e 46 6c 65 74 63 68 |ors_JustinFletch| 00001730 65 72 3e 2c 20 31 39 39 36 20 61 6e 64 20 69 73 |er>, 1996 and is| 00001740 20 72 65 6c 65 61 73 65 64 20 69 6e 74 6f 20 74 | released into t| 00001750 68 65 20 50 75 62 6c 69 63 20 44 6f 6d 61 69 6e |he Public Domain| 00001760 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20 72 | with the same r| 00001770 65 73 74 72 69 63 74 69 6f 6e 73 20 61 73 20 73 |estrictions as s| 00001780 75 62 73 69 73 74 20 69 6e 20 6d 6f 73 74 20 50 |ubsist in most P| 00001790 44 20 73 6f 66 74 77 61 72 65 2e 20 54 68 69 73 |D software. This| 000017a0 20 69 6e 63 6c 75 64 65 73 20 74 68 65 20 66 61 | includes the fa| 000017b0 63 74 20 74 68 61 74 20 77 68 65 6e 20 64 69 73 |ct that when dis| 000017c0 74 72 69 62 75 74 65 64 20 74 68 65 20 65 6e 74 |tributed the ent| 000017d0 69 72 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 |ire application | 000017e0 6d 75 73 74 20 72 65 6d 61 69 6e 20 69 6e 74 61 |must remain inta| 000017f0 63 74 2e 0a |ct..| 000017f4