home *** CD-ROM | disk | FTP | other *** search
Unknown | 1996-08-29 | 8.2 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
| |
100%
| gt2
| Kopftext: 'HELP('
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 48 45 4c 50 28 00 00 00 | c9 00 00 00 40 16 00 00 |HELP(...|....@...|
|00000010| 2c 00 00 00 00 fd ff ff | 00 00 00 00 88 00 00 00 |,.......|........|
|00000020| 00 01 00 00 00 00 00 00 | 24 00 00 00 44 49 52 24 |........|$...DIR$|
|00000030| 90 00 00 00 88 00 00 00 | 0c 0d 00 00 46 fd ff ff |........|....F...|
|00000040| 7e 58 9a 4e 20 02 00 00 | 13 01 00 00 00 00 00 00 |~X.N ...|........|
|00000050| 50 52 4f 43 00 00 00 00 | ec 11 00 00 46 fd ff ff |PROC....|....F...|
|00000060| 80 5c 9a 4e 80 01 00 00 | 13 01 00 00 00 00 00 00 |.\.N....|........|
|00000070| 46 4e 00 00 98 1c 00 00 | 46 fd ff ff d3 4d 48 d1 |FN......|F....MH.|
|00000080| 2b 01 00 00 13 00 00 00 | 00 00 00 00 21 52 6f 6f |+.......|....!Roo|
|00000090| 74 00 00 00 c4 1d 00 00 | 46 fd ff ff 8a c4 99 ea |t.......|F.......|
|000000a0| 10 03 00 00 13 00 00 00 | 00 00 00 00 69 6e 66 6f |........|....info|
|000000b0| 00 00 00 00 18 20 82 e2 | 04 e0 92 e4 44 41 54 41 |..... ..|....DATA|
|000000c0| 16 01 00 00 50 52 4f 43 | 68 65 61 70 5f 72 65 64 |....PROC|heap_red|
|000000d0| 75 63 65 0a 23 50 61 72 | 65 6e 74 20 21 52 6f 6f |uce.#Par|ent !Roo|
|000000e0| 74 0a 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 69 |t.This r|outine i|
|000000f0| 73 20 74 68 65 20 6e 6f | 6e 2d 72 65 6c 6f 63 61 |s the no|n-reloca|
|00000100| 74 61 62 6c 65 20 76 65 | 72 73 69 6f 6e 20 6f 66 |table ve|rsion of|
|00000110| 20 3c 50 52 4f 43 68 65 | 61 70 5f 67 61 72 62 61 | <PROChe|ap_garba|
|00000120| 67 65 3e 2e 20 41 6c 6c | 20 66 72 65 65 20 73 70 |ge>. All| free sp|
|00000130| 61 63 65 20 61 74 20 74 | 68 65 20 65 6e 64 20 6f |ace at t|he end o|
|00000140| 66 20 74 68 65 20 68 65 | 61 70 20 77 69 6c 6c 20 |f the he|ap will |
|00000150| 62 65 20 72 65 6c 65 61 | 73 65 64 20 74 6f 20 72 |be relea|sed to r|
|00000160| 65 64 75 63 65 20 74 68 | 65 20 57 69 6d 70 53 6c |educe th|e WimpSl|
|00000170| 6f 74 20 61 6c 6c 6f 63 | 61 74 69 6f 6e 20 61 73 |ot alloc|ation as|
|00000180| 20 66 61 72 20 61 73 20 | 69 73 20 70 6f 73 73 69 | far as |is possi|
|00000190| 62 6c 65 2e 0a 0a 4e 6f | 74 65 3a 20 54 68 69 73 |ble...No|te: This|
|000001a0| 20 69 73 20 61 75 74 6f | 6d 61 74 69 63 61 6c 6c | is auto|maticall|
|000001b0| 79 20 63 61 72 72 69 65 | 64 20 6f 75 74 20 62 79 |y carrie|d out by|
|000001c0| 20 50 52 4f 43 68 65 61 | 70 5f 67 61 72 62 61 67 | PROChea|p_garbag|
|000001d0| 65 2e 00 eb 00 b0 90 e5 | 46 52 45 45 65 00 00 00 |e.......|FREEe...|
|000001e0| 94 15 00 00 72 65 6c 65 | 61 73 65 28 70 6f 69 6e |....rele|ase(poin|
|000001f0| 74 65 72 29 20 2d 20 48 | 65 61 70 4c 69 62 20 76 |ter) - H|eapLib v|
|00000200| 65 72 73 69 6f 6e 0a 23 | 50 61 72 65 6e 74 20 21 |ersion.#|Parent !|
|00000210| 52 6f 6f 74 0a 3d 3e 09 | 7b 2f 7d 70 6f 69 6e 74 |Root.=>.|{/}point|
|00000220| 65 72 7b 2f 7d 09 70 6f | 69 6e 74 65 72 20 74 6f |er{/}.po|inter to|
|00000230| 20 62 6c 6f 63 6b 0a 3c | 3d 09 2d 31 20 46 52 45 | block.<|=.-1 FRE|
|00000240| 45 c0 00 00 00 6c 1b 00 | 00 68 65 61 70 5f 66 72 |E....l..|.heap_fr|
|00000250| 65 65 28 6d 61 78 2c 66 | 72 65 65 29 0a 23 50 61 |ee(max,f|ree).#Pa|
|00000260| 72 65 6e 74 20 21 52 6f | 6f 74 0a 3c 3d 09 7b 2f |rent !Ro|ot.<=.{/|
|00000270| 7d 6d 61 78 7b 2f 7d 09 | 74 6f 74 61 6c 20 73 69 |}max{/}.|total si|
|00000280| 7a 65 20 61 6c 6c 6f 63 | 61 74 65 64 20 74 6f 20 |ze alloc|ated to |
|00000290| 68 65 61 70 0a 09 7b 2f | 7d 66 72 65 65 7b 2f 7d |heap..{/|}free{/}|
|000002a0| 09 61 6d 6f 75 6e 74 20 | 6f 66 20 66 72 65 65 20 |.amount |of free |
|000002b0| 73 70 61 63 65 20 69 6e | 20 68 65 61 70 0a 0a 54 |space in| heap..T|
|000002c0| 68 69 73 20 63 61 6c 6c | 20 69 73 20 75 73 65 64 |his call| is used|
|000002d0| 20 74 6f 20 66 69 6e 64 | 20 74 68 65 20 61 6d 6f | to find| the amo|
|000002e0| 75 6e 74 20 6f 66 20 66 | 72 65 65 20 73 70 61 63 |unt of f|ree spac|
|000002f0| 65 20 69 6e 20 74 68 65 | 20 68 65 61 70 00 00 00 |e in the| heap...|
|00000300| 44 41 54 41 6a 01 00 00 | 50 52 4f 43 69 6e 69 74 |DATAj...|PROCinit|
|00000310| 68 65 61 70 0a 23 50 61 | 72 65 6e 74 20 21 52 6f |heap.#Pa|rent !Ro|
|00000320| 6f 74 0a 49 6e 69 74 69 | 61 6c 69 73 65 73 20 68 |ot.Initi|alises h|
|00000330| 65 61 70 20 6c 69 62 72 | 61 72 79 20 76 61 72 69 |eap libr|ary vari|
|00000340| 61 62 6c 65 73 2e 0a 0a | 43 61 6c 6c 20 74 68 69 |ables...|Call thi|
|00000350| 73 20 72 6f 75 74 69 6e | 65 20 61 74 20 74 68 65 |s routin|e at the|
|00000360| 20 73 74 61 72 74 20 6f | 66 20 61 6e 79 20 70 72 | start o|f any pr|
|00000370| 6f 67 72 61 6d 20 74 68 | 61 74 20 75 73 65 73 20 |ogram th|at uses |
|00000380| 74 68 65 20 48 65 61 70 | 4c 69 62 20 66 69 6c 65 |the Heap|Lib file|
|00000390| 2e 20 49 6e 69 74 69 61 | 6c 6c 79 2c 20 74 68 65 |. Initia|lly, the|
|000003a0| 20 72 65 6c 6f 63 61 74 | 61 62 6c 65 20 62 6c 6f | relocat|able blo|
|000003b0| 63 6b 20 6d 61 6e 61 67 | 65 72 20 61 6c 6c 6f 63 |ck manag|er alloc|
|000003c0| 61 74 65 73 20 6f 6e 6c | 79 20 74 77 6f 20 68 61 |ates onl|y two ha|
|000003d0| 6e 64 6c 65 73 2c 20 62 | 75 74 20 74 68 69 73 20 |ndles, b|ut this |
|000003e0| 69 73 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |is autom|atically|
|000003f0| 20 69 6e 63 72 65 61 73 | 65 64 20 61 73 20 72 65 | increas|ed as re|
|00000400| 71 75 69 72 65 64 2e 20 | 54 68 65 20 6d 69 6e 69 |quired. |The mini|
|00000410| 6d 75 6d 20 73 69 7a 65 | 20 74 68 65 20 68 65 61 |mum size| the hea|
|00000420| 70 20 63 61 6e 20 6f 63 | 63 75 70 79 20 69 73 20 |p can oc|cupy is |
|00000430| 74 68 61 74 20 6f 66 20 | 74 68 65 20 70 61 67 65 |that of |the page|
|00000440| 20 73 69 7a 65 2c 20 73 | 65 65 20 74 68 65 20 4d | size, s|ee the M|
|00000450| 61 63 68 69 6e 65 20 6d | 61 6e 75 61 6c 20 66 6f |achine m|anual fo|
|00000460| 72 20 64 65 74 61 69 6c | 73 2e 00 00 46 52 45 45 |r detail|s...FREE|
|00000470| f3 00 00 00 3d 02 00 00 | 6c 6f 63 6b 62 6c 6f 63 |....=...|lockbloc|
|00000480| 6b 28 70 6f 69 6e 74 65 | 72 29 0a 23 50 61 72 65 |k(pointe|r).#Pare|
|00000490| 6e 74 20 21 52 6f 6f 74 | 0a 3d 3e 09 7b 2f 7d 70 |nt !Root|.=>.{/}p|
|000004a0| 6f 69 6e 74 65 72 7b 2f | 7d 09 70 6f 69 6e 74 65 |ointer{/|}.pointe|
|000004b0| 72 20 74 6f 20 62 6c 6f | 63 6b 0a 0a 4c 6f 63 6b |r to blo|ck..Lock|
|000004c0| 73 20 61 20 72 65 6c 6f | 63 61 74 61 62 6c 65 20 |s a relo|catable |
|000004d0| 62 6c 6f 63 6b 20 73 6f | 20 74 68 61 74 20 69 74 |block so| that it|
|000004e0| 20 69 73 20 6e 65 76 65 | 72 20 70 61 73 73 65 64 | is neve|r passed|
|000004f0| 20 74 6f 20 74 68 65 20 | 3c 50 52 4f 43 68 65 61 | to the |<PROChea|
|00000500| 70 5f 72 65 6c 6f 63 61 | 74 65 3e 20 61 6e 64 20 |p_reloca|te> and |
|00000510| 77 69 6c 6c 20 74 68 65 | 72 65 66 6f 72 65 20 72 |will the|refore r|
|00000520| 65 6d 61 69 6e 20 69 6e | 20 74 68 65 20 73 61 6d |emain in| the sam|
|00000530| 65 20 6c 6f 63 61 74 69 | 6f 6e 20 75 6e 74 69 6c |e locati|on until|
|00000540| 20 3c 75 6e 6c 6f 63 6b | 65 64 3d 3e 50 52 4f 43 | <unlock|ed=>PROC|
|00000550| 75 6e 6c 6f 63 6b 5f 62 | 6c 6f 63 6b 3e 2e 0a 00 |unlock_b|lock>...|
|00000560| 44 41 54 41 b0 00 00 00 | 50 52 4f 43 75 6e 6c 6f |DATA....|PROCunlo|
|00000570| 63 6b 62 6c 6f 63 6b 28 | 70 6f 69 6e 74 65 72 29 |ckblock(|pointer)|
|00000580| 0a 23 50 61 72 65 6e 74 | 20 21 52 6f 6f 74 0a 3d |.#Parent| !Root.=|
|00000590| 3e 09 7b 2f 7d 70 6f 69 | 6e 74 65 72 7b 2f 7d 09 |>.{/}poi|nter{/}.|
|000005a0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 62 6c 6f 63 6b |pointer |to block|
|000005b0| 0a 0a 55 6e 6c 6f 63 6b | 73 20 61 20 70 72 65 76 |..Unlock|s a prev|
|000005c0| 69 6f 75 73 6c 79 20 6c | 6f 63 6b 65 64 20 72 65 |iously l|ocked re|
|000005d0| 6c 6f 63 61 74 61 62 6c | 65 20 62 6c 6f 63 6b 20 |locatabl|e block |
|000005e0| 73 6f 20 74 68 61 74 20 | 69 74 20 63 61 6e 20 62 |so that |it can b|
|000005f0| 65 20 6d 6f 76 65 64 20 | 62 79 20 3c 50 52 4f 43 |e moved |by <PROC|
|00000600| 68 65 61 70 5f 72 65 6c | 6f 63 61 74 65 3e 2e 0a |heap_rel|ocate>..|
|00000610| 44 41 54 41 c4 02 00 00 | 50 52 4f 43 68 65 61 70 |DATA....|PROCheap|
|00000620| 5f 67 61 72 62 61 67 65 | 0a 23 50 61 72 65 6e 74 |_garbage|.#Parent|
|00000630| 20 21 52 6f 6f 74 0a 54 | 68 69 73 20 62 65 67 69 | !Root.T|his begi|
|00000640| 6e 73 20 61 20 73 65 63 | 74 69 6f 6e 20 6f 66 20 |ns a sec|tion of |
|00000650| 67 61 72 62 61 67 65 20 | 63 6f 6c 6c 65 63 74 69 |garbage |collecti|
|00000660| 6f 6e 20 63 61 6c 6c 73 | 2c 20 75 73 65 64 20 74 |on calls|, used t|
|00000670| 6f 20 72 65 64 75 63 65 | 20 74 68 65 20 73 69 7a |o reduce| the siz|
|00000680| 65 20 6f 66 20 74 68 65 | 20 68 65 61 70 20 74 6f |e of the| heap to|
|00000690| 20 69 74 73 20 73 6d 61 | 6c 6c 65 73 74 20 70 6f | its sma|llest po|
|000006a0| 73 73 69 62 6c 65 20 73 | 69 7a 65 2e 0a 0a 4f 6e |ssible s|ize...On|
|000006b0| 6c 79 20 72 65 6c 6f 63 | 61 74 61 62 6c 65 20 62 |ly reloc|atable b|
|000006c0| 6c 6f 63 6b 73 20 6d 61 | 79 20 62 65 20 6d 6f 76 |locks ma|y be mov|
|000006d0| 65 64 3b 20 61 6c 6c 20 | 6f 74 68 65 72 20 62 6c |ed; all |other bl|
|000006e0| 6f 63 6b 73 20 72 65 6d | 61 69 6e 20 69 6e 20 74 |ocks rem|ain in t|
|000006f0| 68 65 20 73 61 6d 65 20 | 6c 6f 63 61 74 69 6f 6e |he same |location|
|00000700| 2e 20 49 66 20 61 20 62 | 6c 6f 63 6b 20 69 73 20 |. If a b|lock is |
|00000710| 72 65 71 75 69 72 65 64 | 20 74 6f 20 6d 6f 76 65 |required| to move|
|00000720| 2c 20 74 68 65 6e 20 3c | 50 52 4f 43 68 65 61 70 |, then <|PROCheap|
|00000730| 5f 72 65 6c 6f 63 61 74 | 65 3e 20 77 69 6c 6c 20 |_relocat|e> will |
|00000740| 62 65 20 63 61 6c 6c 65 | 64 2e 20 49 74 20 77 69 |be calle|d. It wi|
|00000750| 6c 6c 20 74 68 65 6e 20 | 62 65 20 75 70 20 74 6f |ll then |be up to|
|00000760| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00000770| 20 74 6f 20 63 61 6c 6c | 20 3c 50 52 4f 43 68 65 | to call| <PROChe|
|00000780| 61 70 5f 6f 6b 74 6f 6d | 6f 76 65 3e 20 74 6f 20 |ap_oktom|ove> to |
|00000790| 75 70 64 61 74 65 20 69 | 74 27 73 20 70 6f 69 6e |update i|t's poin|
|000007a0| 74 65 72 73 2e 0a 0a 49 | 66 20 70 6f 73 73 69 62 |ters...I|f possib|
|000007b0| 6c 65 2c 20 74 68 65 20 | 73 6c 6f 74 20 73 69 7a |le, the |slot siz|
|000007c0| 65 20 77 69 6c 6c 20 62 | 65 20 72 65 64 75 63 65 |e will b|e reduce|
|000007d0| 64 20 73 6f 20 74 68 61 | 74 20 74 68 65 20 6d 69 |d so tha|t the mi|
|000007e0| 6e 69 6d 75 6d 20 73 70 | 61 63 65 20 69 73 20 63 |nimum sp|ace is c|
|000007f0| 6c 61 69 6d 65 64 2c 20 | 61 6e 64 20 74 68 65 20 |laimed, |and the |
|00000800| 72 65 6c 6f 63 61 74 61 | 62 6c 65 20 62 6c 6f 63 |relocata|ble bloc|
|00000810| 6b 20 69 6e 64 65 78 20 | 77 69 6c 6c 20 62 65 20 |k index |will be |
|00000820| 6d 6f 76 65 64 20 64 6f | 77 6e 20 74 68 65 20 68 |moved do|wn the h|
|00000830| 65 61 70 2e 0a 0a 4e 6f | 74 65 3a 20 54 68 69 73 |eap...No|te: This|
|00000840| 20 63 61 6c 6c 20 77 69 | 6c 6c 20 6e 6f 74 20 66 | call wi|ll not f|
|00000850| 75 6c 6c 79 20 63 6f 6d | 70 61 63 74 20 74 68 65 |ully com|pact the|
|00000860| 20 68 65 61 70 2e 20 44 | 75 65 20 74 6f 20 74 68 | heap. D|ue to th|
|00000870| 65 20 6d 61 6e 6e 65 72 | 20 69 6e 20 77 68 69 63 |e manner| in whic|
|00000880| 68 20 61 6c 6c 6f 63 61 | 74 69 6f 6e 20 6f 66 20 |h alloca|tion of |
|00000890| 68 65 61 70 20 62 6c 6f | 63 6b 73 20 69 73 20 64 |heap blo|cks is d|
|000008a0| 6f 6e 65 20 6d 61 6e 79 | 20 63 61 6c 6c 73 20 74 |one many| calls t|
|000008b0| 6f 20 50 52 4f 43 68 65 | 61 70 5f 67 61 72 62 61 |o PROChe|ap_garba|
|000008c0| 67 65 20 6d 61 79 20 62 | 65 20 72 65 71 75 69 72 |ge may b|e requir|
|000008d0| 65 64 2e 0a 44 41 54 41 | 2a 03 00 00 50 52 4f 43 |ed..DATA|*...PROC|
|000008e0| 68 65 61 70 5f 72 65 6c | 6f 63 61 74 65 28 70 6f |heap_rel|ocate(po|
|000008f0| 69 6e 74 65 72 2c 73 69 | 7a 65 29 0a 23 50 61 72 |inter,si|ze).#Par|
|00000900| 65 6e 74 20 21 52 6f 6f | 74 0a 3d 3e 09 7b 2f 7d |ent !Roo|t.=>.{/}|
|00000910| 70 6f 69 6e 74 65 72 7b | 2f 7d 09 70 6f 69 6e 74 |pointer{|/}.point|
|00000920| 65 72 20 74 6f 20 62 6c | 6f 63 6b 0a 09 7b 2f 7d |er to bl|ock..{/}|
|00000930| 73 69 7a 65 7b 2f 7d 09 | 73 69 7a 65 20 6f 66 20 |size{/}.|size of |
|00000940| 62 6c 6f 63 6b 20 28 69 | 6e 74 65 72 6e 61 6c 6c |block (i|nternall|
|00000950| 79 20 75 73 65 64 29 0a | 0a 54 68 69 73 20 72 6f |y used).|.This ro|
|00000960| 75 74 69 6e 65 20 73 68 | 6f 75 6c 64 20 65 78 69 |utine sh|ould exi|
|00000970| 73 74 20 69 6e 20 74 68 | 65 20 6d 61 69 6e 20 61 |st in th|e main a|
|00000980| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 6f 20 62 65 |pplicati|on to be|
|00000990| 20 63 61 6c 6c 65 64 20 | 64 75 72 69 6e 67 20 3c | called |during <|
|000009a0| 50 52 4f 43 68 65 61 70 | 5f 67 61 72 62 61 67 65 |PROCheap|_garbage|
|000009b0| 3e 20 73 6f 20 74 68 61 | 74 20 74 68 65 20 61 70 |> so tha|t the ap|
|000009c0| 70 6c 69 63 61 74 69 6f | 6e 73 20 69 6e 74 65 72 |plicatio|ns inter|
|000009d0| 6e 61 6c 20 70 6f 69 6e | 74 65 72 73 20 6d 61 79 |nal poin|ters may|
|000009e0| 20 62 65 20 75 70 64 61 | 74 65 64 2e 20 54 6f 20 | be upda|ted. To |
|000009f0| 6d 6f 76 65 20 74 68 65 | 20 62 6c 6f 63 6b 2c 20 |move the| block, |
|00000a00| 3c 50 52 4f 43 68 65 61 | 70 5f 6f 6b 74 6f 6d 6f |<PROChea|p_oktomo|
|00000a10| 76 65 3e 20 73 68 6f 75 | 6c 64 20 62 65 20 63 61 |ve> shou|ld be ca|
|00000a20| 6c 6c 65 64 2e 20 54 68 | 65 20 63 6f 64 65 20 73 |lled. Th|e code s|
|00000a30| 68 6f 75 6c 64 20 62 65 | 20 73 6f 6d 65 74 68 69 |hould be| somethi|
|00000a40| 6e 67 20 6c 69 6b 65 20 | 3a 0a 23 49 6e 64 65 6e |ng like |:.#Inden|
|00000a50| 74 20 32 0a 7b 66 43 6f | 64 65 7d 44 45 46 50 52 |t 2.{fCo|de}DEFPR|
|00000a60| 4f 43 68 65 61 70 5f 72 | 65 6c 6f 63 61 74 65 28 |OCheap_r|elocate(|
|00000a70| 70 74 72 2c 73 69 7a 65 | 29 0a 43 41 53 45 20 70 |ptr,size|).CASE p|
|00000a80| 74 72 20 4f 46 0a 20 57 | 48 45 4e 20 69 6e 64 65 |tr OF. W|HEN inde|
|00000a90| 78 3a 50 52 4f 43 68 65 | 61 70 5f 6f 6b 74 6f 6d |x:PROChe|ap_oktom|
|00000aa0| 6f 76 65 28 69 6e 64 65 | 78 2c 73 69 7a 65 29 0a |ove(inde|x,size).|
|00000ab0| 20 65 74 63 2e 0a 45 4e | 44 43 41 53 45 0a 45 4e | etc..EN|DCASE.EN|
|00000ac0| 44 50 52 4f 43 0a 7b 66 | 7d 0a 23 49 6e 64 65 6e |DPROC.{f|}.#Inden|
|00000ad0| 74 0a 49 66 20 61 20 67 | 72 6f 75 70 20 6f 66 20 |t.If a g|roup of |
|00000ae0| 70 6f 69 6e 74 65 72 73 | 20 61 72 65 20 75 73 65 |pointers| are use|
|00000af0| 64 20 69 6e 20 61 6e 20 | 61 72 72 61 79 2c 20 74 |d in an |array, t|
|00000b00| 68 65 6e 20 74 68 65 20 | 61 72 72 61 79 20 73 68 |hen the |array sh|
|00000b10| 6f 75 6c 64 20 62 65 20 | 73 65 61 72 63 68 65 64 |ould be |searched|
|00000b20| 20 66 6f 72 20 74 68 65 | 20 70 6f 69 6e 74 65 72 | for the| pointer|
|00000b30| 20 61 6e 64 20 69 74 20 | 75 70 64 61 74 65 64 2e | and it |updated.|
|00000b40| 0a 0a 4e 6f 74 65 3a 09 | 49 66 20 74 68 65 20 72 |..Note:.|If the r|
|00000b50| 6f 75 74 69 6e 65 20 64 | 6f 65 73 20 6e 6f 74 20 |outine d|oes not |
|00000b60| 77 69 73 68 20 74 6f 20 | 6d 6f 76 65 20 61 20 62 |wish to |move a b|
|00000b70| 6c 6f 63 6b 2c 20 74 68 | 65 6e 20 69 74 20 6e 65 |lock, th|en it ne|
|00000b80| 65 64 20 6e 6f 74 20 63 | 61 6c 6c 20 50 52 4f 43 |ed not c|all PROC|
|00000b90| 68 65 61 70 5f 6f 6b 74 | 6f 6d 6f 76 65 2e 0a 4e |heap_okt|omove..N|
|00000ba0| 6f 74 65 3a 09 57 68 65 | 6e 20 61 20 62 6c 6f 63 |ote:.Whe|n a bloc|
|00000bb0| 6b 20 69 73 20 6c 6f 63 | 6b 65 64 20 69 74 27 73 |k is loc|ked it's|
|00000bc0| 20 70 6f 69 6e 74 65 72 | 20 77 69 6c 6c 20 6e 65 | pointer| will ne|
|00000bd0| 76 65 72 20 62 65 20 70 | 61 73 73 65 64 20 74 6f |ver be p|assed to|
|00000be0| 20 50 52 4f 43 68 65 61 | 70 5f 72 65 6c 6f 63 61 | PROChea|p_reloca|
|00000bf0| 74 65 20 66 6f 72 20 6d | 6f 76 69 6e 67 2e 00 00 |te for m|oving...|
|00000c00| 44 41 54 41 0b 01 00 00 | 50 52 4f 43 68 65 61 70 |DATA....|PROCheap|
|00000c10| 5f 6f 6b 74 6f 6d 6f 76 | 65 28 70 6f 69 6e 74 65 |_oktomov|e(pointe|
|00000c20| 72 2c 73 69 7a 65 29 0a | 23 50 61 72 65 6e 74 20 |r,size).|#Parent |
|00000c30| 21 52 6f 6f 74 0a 3d 3e | 09 7b 2f 7d 70 6f 69 6e |!Root.=>|.{/}poin|
|00000c40| 74 65 72 7b 2f 7d 09 70 | 6f 69 6e 74 65 72 20 74 |ter{/}.p|ointer t|
|00000c50| 6f 20 62 6c 6f 63 6b 0a | 09 7b 2f 7d 73 69 7a 65 |o block.|.{/}size|
|00000c60| 7b 2f 7d 09 73 69 7a 65 | 20 6f 66 20 62 6c 6f 63 |{/}.size| of bloc|
|00000c70| 6b 20 28 69 6e 74 65 72 | 6e 61 6c 6c 79 20 75 73 |k (inter|nally us|
|00000c80| 65 64 29 0a 5c 3c 3d 09 | 7b 2f 7d 70 6f 69 6e 74 |ed).\<=.|{/}point|
|00000c90| 65 72 7b 2f 7d 20 75 70 | 64 61 74 65 64 20 77 69 |er{/} up|dated wi|
|00000ca0| 74 68 20 6e 65 77 20 6c | 6f 63 61 74 69 6f 6e 0a |th new l|ocation.|
|00000cb0| 0a 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 73 68 |.This ro|utine sh|
|00000cc0| 6f 75 6c 64 20 62 65 20 | 63 61 6c 6c 65 64 20 77 |ould be |called w|
|00000cd0| 69 74 68 69 6e 20 3c 50 | 52 4f 43 68 65 61 70 5f |ithin <P|ROCheap_|
|00000ce0| 72 65 6c 6f 63 61 74 65 | 3e 20 77 68 65 6e 20 61 |relocate|> when a|
|00000cf0| 20 70 6f 69 6e 74 65 72 | 20 72 65 71 75 69 72 65 | pointer| require|
|00000d00| 73 20 75 70 64 61 74 69 | 6e 67 2e 00 44 49 52 24 |s updati|ng..DIR$|
|00000d10| 20 02 00 00 58 01 00 00 | 40 1a 00 00 47 ff ff ff | ...X...|@...G...|
|00000d20| e9 b7 57 05 2a 01 00 00 | 13 00 00 00 00 00 00 00 |..W.*...|........|
|00000d30| 72 65 6c 65 61 73 65 00 | 00 03 00 00 46 ff ff ff |release.|....F...|
|00000d40| 62 0e e4 4d 6a 01 00 00 | 13 00 00 00 00 00 00 00 |b..Mj...|........|
|00000d50| 69 6e 69 74 68 65 61 70 | 00 00 00 00 90 14 00 00 |initheap|........|
|00000d60| 46 ff ff ff 1e 47 ed a9 | f2 00 00 00 13 00 00 00 |F....G..|........|
|00000d70| 00 00 00 00 6c 6f 63 6b | 62 6c 6f 63 6b 00 00 00 |....lock|block...|
|00000d80| 60 05 00 00 46 ff ff ff | 8e f4 fa 4d b0 00 00 00 |`...F...|...M....|
|00000d90| 13 00 00 00 00 00 00 00 | 75 6e 6c 6f 63 6b 62 6c |........|unlockbl|
|00000da0| 6f 63 6b 00 10 06 00 00 | 46 ff ff ff 71 fc fa 4d |ock.....|F...q..M|
|00000db0| c4 02 00 00 13 00 00 00 | 00 00 00 00 68 65 61 70 |........|....heap|
|00000dc0| 5f 67 61 72 62 61 67 65 | 00 00 00 00 d4 08 00 00 |_garbage|........|
|00000dd0| 46 ff ff ff ae 02 fb 4d | 2a 03 00 00 13 00 00 00 |F......M|*.......|
|00000de0| 00 00 00 00 68 65 61 70 | 5f 72 65 6c 6f 63 61 74 |....heap|_relocat|
|00000df0| 65 00 00 00 00 0c 00 00 | 46 ff ff ff 20 0b fb 4d |e.......|F... ..M|
|00000e00| 0b 01 00 00 13 00 00 00 | 00 00 00 00 68 65 61 70 |........|....heap|
|00000e10| 5f 6f 6b 74 6f 6d 6f 76 | 65 00 00 00 bc 00 00 00 |_oktomov|e.......|
|00000e20| 46 ff ff ff 98 f1 03 4e | 16 01 00 00 13 00 00 00 |F......N|........|
|00000e30| 00 00 00 00 68 65 61 70 | 5f 72 65 64 75 63 65 00 |....heap|_reduce.|
|00000e40| d4 1b 00 00 46 ff ff ff | 42 63 34 53 c1 00 00 00 |....F...|Bc4S....|
|00000e50| 13 00 00 00 00 00 00 00 | 68 65 61 70 5f 66 72 65 |........|heap_fre|
|00000e60| 65 00 00 00 ff ff ff ff | ff ff ff ff ff ff ff ff |e.......|........|
|00000e70| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000e80| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000e90| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000ea0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000eb0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000ec0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000ed0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000ee0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000ef0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000f00| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000f10| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00000f20| ff ff ff ff ff ff ff ff | ff ff ff ff 46 52 45 45 |........|....FREE|
|00000f30| 68 00 00 00 ff ff ff ff | 94 0f 00 00 46 ff ff ff |h.......|....F...|
|00000f40| fc 39 5f 4e 65 01 00 00 | 13 00 00 00 00 00 00 00 |.9_Ne...|........|
|00000f50| 63 6c 61 69 6d 00 00 00 | fc 10 00 00 46 ff ff ff |claim...|....F...|
|00000f60| 8d f8 fa 4d ed 00 00 00 | 13 00 00 00 00 00 00 00 |...M....|........|
|00000f70| 65 78 74 65 6e 64 00 00 | 6c 00 00 ea 6d 00 00 ea |extend..|l...m...|
|00000f80| 6e 00 00 ea 15 00 80 e2 | 08 00 50 e3 05 00 00 0a |n.......|..P.....|
|00000f90| 0e 00 50 e3 44 41 54 41 | 65 01 00 00 46 4e 63 6c |..P.DATA|e...FNcl|
|00000fa0| 61 69 6d 28 73 69 7a 65 | 29 20 2d 20 48 65 61 70 |aim(size|) - Heap|
|00000fb0| 4c 69 62 20 76 65 73 69 | 6f 6e 0a 23 50 61 72 65 |Lib vesi|on.#Pare|
|00000fc0| 6e 74 20 21 52 6f 6f 74 | 0a 3d 3e 09 7b 2f 7d 73 |nt !Root|.=>.{/}s|
|00000fd0| 69 7a 65 7b 2f 7d 09 73 | 69 7a 65 20 6f 66 20 62 |ize{/}.s|ize of b|
|00000fe0| 6c 6f 63 6b 2c 20 6f 72 | 20 2d 76 65 20 73 69 7a |lock, or| -ve siz|
|00000ff0| 65 20 69 66 20 72 65 6c | 6f 63 61 74 61 62 6c 65 |e if rel|ocatable|
|00001000| 0a 3c 3d 09 70 6f 69 6e | 74 65 72 20 74 6f 20 62 |.<=.poin|ter to b|
|00001010| 6c 6f 63 6b 2c 20 6f 72 | 20 2d 31 20 69 66 20 6e |lock, or| -1 if n|
|00001020| 6f 20 72 6f 6f 6d 0a 0a | 43 6c 61 69 6d 20 61 20 |o room..|Claim a |
|00001030| 62 6c 6f 63 6b 20 77 69 | 74 68 69 6e 20 68 65 61 |block wi|thin hea|
|00001040| 70 2e 20 52 65 6c 6f 63 | 61 74 61 62 6c 65 20 62 |p. Reloc|atable b|
|00001050| 6c 6f 63 6b 73 20 6d 61 | 79 20 62 65 20 6d 6f 76 |locks ma|y be mov|
|00001060| 65 64 20 62 79 20 74 68 | 65 20 3c 50 52 4f 43 68 |ed by th|e <PROCh|
|00001070| 65 61 70 5f 67 61 72 62 | 61 67 65 3e 20 72 6f 75 |eap_garb|age> rou|
|00001080| 74 69 6e 65 2e 0a 0a 4e | 6f 74 65 3a 20 54 68 69 |tine...N|ote: Thi|
|00001090| 73 20 63 61 6c 6c 20 72 | 65 70 6c 61 63 65 73 20 |s call r|eplaces |
|000010a0| 74 68 65 20 57 69 6d 70 | 4c 69 62 20 52 4d 41 20 |the Wimp|Lib RMA |
|000010b0| 3c 46 4e 63 6c 61 69 6d | 3d 3e 57 69 6d 70 4c 69 |<FNclaim|=>WimpLi|
|000010c0| 62 3a 46 4e 63 6c 61 69 | 6d 3e 20 63 61 6c 6c 2e |b:FNclai|m> call.|
|000010d0| 20 54 6f 20 63 6c 61 69 | 6d 20 61 6e 20 52 4d 41 | To clai|m an RMA|
|000010e0| 20 62 6c 6f 63 6b 20 75 | 73 65 20 3c 46 4e 63 6c | block u|se <FNcl|
|000010f0| 61 69 6d 52 4d 41 3e 2e | 0a 00 00 00 44 41 54 41 |aimRMA>.|....DATA|
|00001100| ed 00 00 00 46 4e 65 78 | 74 65 6e 64 28 70 6f 69 |....FNex|tend(poi|
|00001110| 6e 74 65 72 2c 73 69 7a | 65 29 0a 23 50 61 72 65 |nter,siz|e).#Pare|
|00001120| 6e 74 20 21 52 6f 6f 74 | 0a 3d 3e 09 7b 2f 7d 70 |nt !Root|.=>.{/}p|
|00001130| 6f 69 6e 74 65 72 7b 2f | 7d 09 70 6f 69 6e 74 65 |ointer{/|}.pointe|
|00001140| 72 20 74 6f 20 62 6c 6f | 63 6b 0a 09 7b 2f 7d 73 |r to blo|ck..{/}s|
|00001150| 69 7a 65 7b 2f 7d 09 73 | 69 7a 65 20 74 6f 20 65 |ize{/}.s|ize to e|
|00001160| 78 74 65 6e 64 20 62 79 | 2c 20 6f 72 20 2d 76 65 |xtend by|, or -ve|
|00001170| 20 74 6f 20 72 65 64 75 | 63 65 0a 5c 3c 3d 09 70 | to redu|ce.\<=.p|
|00001180| 6f 69 6e 74 65 72 20 74 | 6f 20 62 6c 6f 63 6b 2c |ointer t|o block,|
|00001190| 20 77 69 74 68 20 62 69 | 74 20 30 20 73 65 74 20 | with bi|t 0 set |
|000011a0| 69 66 20 63 6f 75 6c 64 | 20 6e 6f 74 20 63 6c 61 |if could| not cla|
|000011b0| 69 6d 0a 0a 45 78 74 65 | 6e 64 73 20 61 20 70 72 |im..Exte|nds a pr|
|000011c0| 65 76 69 6f 75 73 6c 79 | 20 63 6c 61 69 6d 65 64 |eviously| claimed|
|000011d0| 20 72 65 6c 6f 63 61 74 | 61 62 6c 65 20 68 65 61 | relocat|able hea|
|000011e0| 70 20 62 6c 6f 63 6b 2e | 0a 00 00 00 44 49 52 24 |p block.|....DIR$|
|000011f0| 80 01 00 00 70 00 00 00 | 94 0f 00 00 46 ff ff ff |....p...|....F...|
|00001200| fc 39 5f 4e 65 01 00 00 | 13 00 00 00 00 00 00 00 |.9_Ne...|........|
|00001210| 63 6c 61 69 6d 00 00 00 | fc 10 00 00 46 ff ff ff |claim...|....F...|
|00001220| 8d f8 fa 4d ed 00 00 00 | 13 00 00 00 00 00 00 00 |...M....|........|
|00001230| 65 78 74 65 6e 64 00 00 | 6c 13 00 00 46 ff ff ff |extend..|l...F...|
|00001240| f9 77 5f 4e 23 01 00 00 | 13 00 00 00 00 00 00 00 |.w_N#...|........|
|00001250| 63 6c 61 69 6d 52 4d 41 | 00 00 00 00 ff ff ff ff |claimRMA|........|
|00001260| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001270| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001280| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001290| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000012a0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000012b0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000012c0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000012d0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000012e0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000012f0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001300| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001310| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001320| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001330| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001340| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001350| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00001360| ff ff ff ff ff ff ff ff | ff ff ff ff 44 41 54 41 |........|....DATA|
|00001370| 23 01 00 00 46 4e 63 6c | 61 69 6d 52 4d 41 28 73 |#...FNcl|aimRMA(s|
|00001380| 69 7a 65 29 0a 23 50 61 | 72 65 6e 74 20 21 52 6f |ize).#Pa|rent !Ro|
|00001390| 6f 74 0a 3d 3e 09 7b 2f | 7d 73 69 7a 65 7b 2f 7d |ot.=>.{/|}size{/}|
|000013a0| 09 73 69 7a 65 20 6f 66 | 20 62 6c 6f 63 6b 0a 3c |.size of| block.<|
|000013b0| 3d 09 70 6f 69 6e 74 65 | 72 20 74 6f 20 62 6c 6f |=.pointe|r to blo|
|000013c0| 63 6b 2c 20 6f 72 20 2d | 31 20 69 66 20 6e 6f 20 |ck, or -|1 if no |
|000013d0| 72 6f 6f 6d 0a 0a 43 6c | 61 69 6d 20 61 20 62 6c |room..Cl|aim a bl|
|000013e0| 6f 63 6b 20 6f 66 20 52 | 4d 41 2e 0a 0a 4e 6f 74 |ock of R|MA...Not|
|000013f0| 65 3a 20 54 68 69 73 20 | 63 61 6c 6c 20 69 73 20 |e: This |call is |
|00001400| 75 73 65 64 20 69 6e 20 | 70 6c 61 63 65 20 6f 66 |used in |place of|
|00001410| 20 57 69 6d 70 4c 69 62 | 20 3c 46 4e 63 6c 61 69 | WimpLib| <FNclai|
|00001420| 6d 3d 3e 57 69 6d 70 4c | 69 62 3a 46 4e 63 6c 61 |m=>WimpL|ib:FNcla|
|00001430| 69 6d 3e 20 77 68 65 6e | 20 61 6e 20 52 4d 41 20 |im> when| an RMA |
|00001440| 63 6c 61 69 6d 20 69 73 | 20 72 65 71 75 69 72 65 |claim is| require|
|00001450| 64 2c 20 61 73 20 46 4e | 63 6c 61 69 6d 20 77 69 |d, as FN|claim wi|
|00001460| 6c 6c 20 62 65 20 63 61 | 75 67 68 74 20 62 79 20 |ll be ca|ught by |
|00001470| 48 65 61 70 4c 69 62 20 | 74 6f 20 63 6c 61 69 6d |HeapLib |to claim|
|00001480| 20 61 20 48 65 61 70 20 | 62 6c 6f 63 6b 2e 0a 00 | a Heap |block...|
|00001490| 44 41 54 41 f2 00 00 00 | 50 52 4f 43 6c 6f 63 6b |DATA....|PROClock|
|000014a0| 62 6c 6f 63 6b 28 70 6f | 69 6e 74 65 72 29 0a 23 |block(po|inter).#|
|000014b0| 50 61 72 65 6e 74 20 21 | 52 6f 6f 74 0a 3d 3e 09 |Parent !|Root.=>.|
|000014c0| 7b 2f 7d 70 6f 69 6e 74 | 65 72 7b 2f 7d 09 70 6f |{/}point|er{/}.po|
|000014d0| 69 6e 74 65 72 20 74 6f | 20 62 6c 6f 63 6b 0a 0a |inter to| block..|
|000014e0| 4c 6f 63 6b 73 20 61 20 | 72 65 6c 6f 63 61 74 61 |Locks a |relocata|
|000014f0| 62 6c 65 20 62 6c 6f 63 | 6b 20 73 6f 20 74 68 61 |ble bloc|k so tha|
|00001500| 74 20 69 74 20 69 73 20 | 6e 65 76 65 72 20 70 61 |t it is |never pa|
|00001510| 73 73 65 64 20 74 6f 20 | 74 68 65 20 3c 50 52 4f |ssed to |the <PRO|
|00001520| 43 68 65 61 70 5f 72 65 | 6c 6f 63 61 74 65 3e 20 |Cheap_re|locate> |
|00001530| 61 6e 64 20 77 69 6c 6c | 20 74 68 65 72 65 66 6f |and will| therefo|
|00001540| 72 65 20 72 65 6d 61 69 | 6e 20 69 6e 20 74 68 65 |re remai|n in the|
|00001550| 20 73 61 6d 65 20 6c 6f | 63 61 74 69 6f 6e 20 75 | same lo|cation u|
|00001560| 6e 74 69 6c 20 3c 75 6e | 6c 6f 63 6b 65 64 3d 3e |ntil <un|locked=>|
|00001570| 50 52 4f 43 75 6e 6c 6f | 63 6b 62 6c 6f 63 6b 3e |PROCunlo|ckblock>|
|00001580| 2e 0a 6e 66 6f 3e 20 6f | 6e 20 48 65 61 70 4c 69 |..nfo> o|n HeapLi|
|00001590| 62 0a 00 00 46 52 45 45 | ac 00 00 00 2c 0f 00 00 |b...FREE|....,...|
|000015a0| 4c 69 62 20 68 65 6c 70 | 0a 23 41 6c 69 67 6e 20 |Lib help|.#Align |
|000015b0| 43 65 6e 74 72 65 0a 7b | 66 68 33 7d 4a 46 53 68 |Centre.{|fh3}JFSh|
|000015c0| 61 72 65 64 20 48 65 61 | 70 4c 69 62 20 76 31 2e |ared Hea|pLib v1.|
|000015d0| 30 31 7b 66 7d 0a 23 41 | 6c 69 67 6e 20 4c 65 66 |01{f}.#A|lign Lef|
|000015e0| 74 0a 0a 54 68 65 20 48 | 65 61 70 20 4c 69 62 72 |t..The H|eap Libr|
|000015f0| 61 72 79 20 69 73 20 61 | 20 42 61 73 69 63 20 4c |ary is a| Basic L|
|00001600| 69 62 72 61 72 79 20 66 | 69 6c 65 20 77 68 69 63 |ibrary f|ile whic|
|00001610| 68 20 70 72 6f 76 69 64 | 65 73 20 73 69 6d 70 6c |h provid|es simpl|
|00001620| 65 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |e proced|ure call|
|00001630| 73 20 74 6f 20 67 69 76 | 65 20 63 6f 6e 74 72 6f |s to giv|e contro|
|00001640| 46 52 45 45 2c 01 00 00 | 80 18 00 00 68 65 61 70 |FREE,...|....heap|
|00001650| 5f 66 72 65 65 28 6d 61 | 78 2c 66 72 65 65 29 0a |_free(ma|x,free).|
|00001660| 23 50 61 72 65 6e 74 20 | 21 52 6f 6f 74 0a 3c 3d |#Parent |!Root.<=|
|00001670| 09 7b 2f 7d 6d 61 78 7b | 2f 7d 09 74 6f 74 61 6c |.{/}max{|/}.total|
|00001680| 20 73 69 7a 65 20 61 6c | 6c 6f 63 61 74 65 64 20 | size al|located |
|00001690| 74 6f 20 68 65 61 70 0a | 09 7b 2f 7d 66 72 65 65 |to heap.|.{/}free|
|000016a0| 7b 2f 7d 09 61 6d 6f 75 | 6e 74 20 6f 66 20 66 72 |{/}.amou|nt of fr|
|000016b0| 65 65 20 73 70 61 63 65 | 20 69 6e 20 68 65 61 70 |ee space| in heap|
|000016c0| 0a 0a 52 65 6c 65 61 73 | 65 20 61 20 63 6c 61 69 |..Releas|e a clai|
|000016d0| 6d 65 64 20 62 6c 6f 63 | 6b 20 77 69 74 68 69 6e |med bloc|k within|
|000016e0| 20 74 68 65 20 48 65 61 | 70 20 28 75 73 69 6e 67 | the Hea|p (using|
|000016f0| 20 3c 46 4e 63 6c 61 69 | 6d 3e 29 20 6f 72 20 52 | <FNclai|m>) or R|
|00001700| 4d 41 20 28 75 73 69 6e | 67 20 3c 46 4e 63 6c 61 |MA (usin|g <FNcla|
|00001710| 69 6d 52 4d 41 3e 29 2e | 0a 0a 4e 6f 74 65 3a 20 |imRMA>).|..Note: |
|00001720| 54 68 69 73 20 63 61 6c | 6c 20 72 65 70 6c 61 63 |This cal|l replac|
|00001730| 65 73 20 74 68 65 20 57 | 69 6d 70 4c 69 62 20 52 |es the W|impLib R|
|00001740| 4d 41 20 3c 50 52 4f 43 | 72 65 6c 65 61 73 65 3d |MA <PROC|release=|
|00001750| 3e 57 69 6d 70 4c 69 62 | 3a 50 52 4f 43 72 65 6c |>WimpLib|:PROCrel|
|00001760| 65 61 73 65 3e 20 63 61 | 6c 6c 2e 0a 46 52 45 45 |ease> ca|ll..FREE|
|00001770| 12 01 00 00 6c 04 00 00 | 4c 69 62 20 72 6f 75 74 |....l...|Lib rout|
|00001780| 69 6e 65 73 0a 23 54 61 | 62 6c 65 20 43 6f 6c 75 |ines.#Ta|ble Colu|
|00001790| 6d 6e 73 20 32 0a 3c 50 | 52 4f 43 69 6e 69 74 68 |mns 2.<P|ROCinith|
|000017a0| 65 61 70 3e 0a 3c 50 52 | 4f 43 68 65 61 70 5f 66 |eap>.<PR|OCheap_f|
|000017b0| 72 65 65 3e 0a 3c 46 4e | 63 6c 61 69 6d 52 4d 41 |ree>.<FN|claimRMA|
|000017c0| 3e 0a 3c 46 4e 63 6c 61 | 69 6d 3e 0a 3c 50 52 4f |>.<FNcla|im>.<PRO|
|000017d0| 43 72 65 6c 65 61 73 65 | 3e 0a 3c 46 4e 65 78 74 |Crelease|>.<FNext|
|000017e0| 65 6e 64 3e 0a 3c 50 52 | 4f 43 6c 6f 63 6b 62 6c |end>.<PR|OClockbl|
|000017f0| 6f 63 6b 3e 0a 3c 50 52 | 4f 43 75 6e 6c 6f 63 6b |ock>.<PR|OCunlock|
|00001800| 62 6c 6f 63 6b 3e 0a 3c | 50 52 4f 43 68 65 61 70 |block>.<|PROCheap|
|00001810| 5f 72 65 64 75 63 65 3e | 0a 3c 50 52 4f 43 68 65 |_reduce>|.<PROChe|
|00001820| 61 70 5f 67 61 72 62 61 | 67 65 3e 0a 3c 50 52 4f |ap_garba|ge>.<PRO|
|00001830| 43 68 65 61 70 5f 72 65 | 6c 6f 63 61 74 65 3e 0a |Cheap_re|locate>.|
|00001840| 3c 50 52 4f 43 68 65 61 | 70 5f 6f 6b 74 6f 6d 6f |<PROChea|p_oktomo|
|00001850| 76 65 3e 0a 23 45 6e 64 | 54 61 62 6c 65 0a 0a 3c |ve>.#End|Table..<|
|00001860| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 3d 3e 69 6e 66 |Informat|ion=>inf|
|00001870| 6f 3e 20 6f 6e 20 48 65 | 61 70 4c 69 62 0a 2e 0a |o> on He|apLib...|
|00001880| 46 52 45 45 c0 01 00 00 | 6c 17 00 00 4c 69 62 20 |FREE....|l...Lib |
|00001890| 68 65 6c 70 0a 23 41 6c | 69 67 6e 20 43 65 6e 74 |help.#Al|ign Cent|
|000018a0| 72 65 0a 7b 66 68 33 7d | 4a 46 53 68 61 72 65 64 |re.{fh3}|JFShared|
|000018b0| 20 48 65 61 70 4c 69 62 | 20 76 31 2e 30 32 7b 66 | HeapLib| v1.02{f|
|000018c0| 7d 0a 23 41 6c 69 67 6e | 20 4c 65 66 74 0a 0a 54 |}.#Align| Left..T|
|000018d0| 68 65 20 48 65 61 70 20 | 4c 69 62 72 61 72 79 20 |he Heap |Library |
|000018e0| 69 73 20 61 20 42 61 73 | 69 63 20 4c 69 62 72 61 |is a Bas|ic Libra|
|000018f0| 72 79 20 66 69 6c 65 20 | 77 68 69 63 68 20 70 72 |ry file |which pr|
|00001900| 6f 76 69 64 65 73 20 73 | 69 6d 70 6c 65 20 70 72 |ovides s|imple pr|
|00001910| 6f 63 65 64 75 72 65 20 | 63 61 6c 6c 73 20 74 6f |ocedure |calls to|
|00001920| 20 67 69 76 65 20 63 6f | 6e 74 72 6f 6c 20 6f 76 | give co|ntrol ov|
|00001930| 65 72 20 6d 65 6d 6f 72 | 79 20 6d 61 6e 61 67 65 |er memor|y manage|
|00001940| 6d 65 6e 74 2e 20 49 6e | 20 63 6f 6e 6a 75 6e 63 |ment. In| conjunc|
|00001950| 74 69 6f 6e 20 77 69 74 | 68 20 74 68 65 20 4a 46 |tion wit|h the JF|
|00001960| 53 68 61 72 65 64 20 73 | 6b 65 6c 65 74 6f 6e 20 |Shared s|keleton |
|00001970| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 61 6e 64 20 |applicat|ion and |
|00001980| 57 69 6d 70 4c 69 62 20 | 74 68 69 73 20 70 72 6f |WimpLib |this pro|
|00001990| 76 69 64 65 73 20 75 73 | 65 66 75 6c 20 61 70 70 |vides us|eful app|
|000019a0| 6c 69 63 61 74 69 6f 6e | 20 6d 65 6d 6f 72 79 20 |lication| memory |
|000019b0| 6d 61 6e 61 67 65 6d 65 | 6e 74 2e 20 54 68 69 73 |manageme|nt. This|
|000019c0| 20 68 65 6c 70 20 66 69 | 6c 65 20 64 65 74 61 69 | help fi|le detai|
|000019d0| 6c 73 20 74 68 65 20 72 | 6f 75 74 69 6e 65 73 20 |ls the r|outines |
|000019e0| 70 72 6f 76 69 64 65 64 | 20 69 6e 20 48 65 61 70 |provided| in Heap|
|000019f0| 4c 69 62 2e 0a 0a 54 68 | 65 20 48 65 61 70 20 4c |Lib...Th|e Heap L|
|00001a00| 69 62 72 61 72 79 20 69 | 73 20 72 65 66 65 72 65 |ibrary i|s refere|
|00001a10| 6e 63 65 64 20 62 79 20 | 5c 3c 48 65 61 70 4c 69 |nced by |\<HeapLi|
|00001a20| 62 72 61 72 79 24 46 69 | 6c 65 3e 20 61 6e 64 20 |brary$Fi|le> and |
|00001a30| 73 68 6f 75 6c 64 20 62 | 65 20 6c 6f 61 64 65 64 |should b|e loaded|
|00001a40| 44 41 54 41 2a 01 00 00 | 50 52 4f 43 72 65 6c 65 |DATA*...|PROCrele|
|00001a50| 61 73 65 28 6d 61 78 2c | 66 72 65 65 29 0a 23 50 |ase(max,|free).#P|
|00001a60| 61 72 65 6e 74 20 21 52 | 6f 6f 74 0a 3c 3d 09 7b |arent !R|oot.<=.{|
|00001a70| 2f 7d 6d 61 78 7b 2f 7d | 09 74 6f 74 61 6c 20 73 |/}max{/}|.total s|
|00001a80| 69 7a 65 20 61 6c 6c 6f | 63 61 74 65 64 20 74 6f |ize allo|cated to|
|00001a90| 20 68 65 61 70 0a 09 7b | 2f 7d 66 72 65 65 7b 2f | heap..{|/}free{/|
|00001aa0| 7d 09 61 6d 6f 75 6e 74 | 20 6f 66 20 66 72 65 65 |}.amount| of free|
|00001ab0| 20 73 70 61 63 65 20 69 | 6e 20 68 65 61 70 0a 0a | space i|n heap..|
|00001ac0| 52 65 6c 65 61 73 65 20 | 61 20 63 6c 61 69 6d 65 |Release |a claime|
|00001ad0| 64 20 62 6c 6f 63 6b 20 | 77 69 74 68 69 6e 20 74 |d block |within t|
|00001ae0| 68 65 20 48 65 61 70 20 | 28 75 73 69 6e 67 20 3c |he Heap |(using <|
|00001af0| 46 4e 63 6c 61 69 6d 3e | 29 20 6f 72 20 52 4d 41 |FNclaim>|) or RMA|
|00001b00| 20 28 75 73 69 6e 67 20 | 3c 46 4e 63 6c 61 69 6d | (using |<FNclaim|
|00001b10| 52 4d 41 3e 29 2e 0a 0a | 4e 6f 74 65 3a 20 54 68 |RMA>)...|Note: Th|
|00001b20| 69 73 20 63 61 6c 6c 20 | 72 65 70 6c 61 63 65 73 |is call |replaces|
|00001b30| 20 74 68 65 20 57 69 6d | 70 4c 69 62 20 52 4d 41 | the Wim|pLib RMA|
|00001b40| 20 3c 50 52 4f 43 72 65 | 6c 65 61 73 65 3d 3e 57 | <PROCre|lease=>W|
|00001b50| 69 6d 70 4c 69 62 3a 50 | 52 4f 43 72 65 6c 65 61 |impLib:P|ROCrelea|
|00001b60| 73 65 3e 20 63 61 6c 6c | 2e 0a 2e 0a 46 52 45 45 |se> call|....FREE|
|00001b70| 68 00 00 00 d8 01 00 00 | 68 65 61 70 5f 66 72 65 |h.......|heap_fre|
|00001b80| 65 28 6d 61 78 2c 66 72 | 65 65 29 0a 23 50 61 72 |e(max,fr|ee).#Par|
|00001b90| 65 6e 74 20 21 52 6f 6f | 74 0a 3c 3d 09 7b 2f 7d |ent !Roo|t.<=.{/}|
|00001ba0| 6d 61 78 7b 2f 7d 09 74 | 6f 74 61 6c 20 73 69 7a |max{/}.t|otal siz|
|00001bb0| 65 20 61 6c 6c 6f 63 61 | 74 65 64 20 74 6f 20 68 |e alloca|ted to h|
|00001bc0| 65 61 70 0a 09 7b 2f 7d | 66 72 65 65 7b 2f 7d 09 |eap..{/}|free{/}.|
|00001bd0| 61 6d 6f 75 44 41 54 41 | c1 00 00 00 50 52 4f 43 |amouDATA|....PROC|
|00001be0| 68 65 61 70 5f 66 72 65 | 65 28 6d 61 78 2c 66 72 |heap_fre|e(max,fr|
|00001bf0| 65 65 29 0a 23 50 61 72 | 65 6e 74 20 21 52 6f 6f |ee).#Par|ent !Roo|
|00001c00| 74 0a 3c 3d 09 7b 2f 7d | 6d 61 78 7b 2f 7d 09 74 |t.<=.{/}|max{/}.t|
|00001c10| 6f 74 61 6c 20 73 69 7a | 65 20 61 6c 6c 6f 63 61 |otal siz|e alloca|
|00001c20| 74 65 64 20 74 6f 20 68 | 65 61 70 0a 09 7b 2f 7d |ted to h|eap..{/}|
|00001c30| 66 72 65 65 7b 2f 7d 09 | 61 6d 6f 75 6e 74 20 6f |free{/}.|amount o|
|00001c40| 66 20 66 72 65 65 20 73 | 70 61 63 65 20 69 6e 20 |f free s|pace in |
|00001c50| 68 65 61 70 0a 0a 54 68 | 69 73 20 63 61 6c 6c 20 |heap..Th|is call |
|00001c60| 69 73 20 75 73 65 64 20 | 74 6f 20 66 69 6e 64 20 |is used |to find |
|00001c70| 74 68 65 20 61 6d 6f 75 | 6e 74 20 6f 66 20 66 72 |the amou|nt of fr|
|00001c80| 65 65 20 73 70 61 63 65 | 20 69 6e 20 74 68 65 20 |ee space| in the |
|00001c90| 68 65 61 70 2e 6c 2e 0a | 44 41 54 41 2b 01 00 00 |heap.l..|DATA+...|
|00001ca0| 48 65 61 70 4c 69 62 20 | 72 6f 75 74 69 6e 65 73 |HeapLib |routines|
|00001cb0| 0a 23 50 61 72 65 6e 74 | 20 53 74 72 6f 6e 67 48 |.#Parent| StrongH|
|00001cc0| 65 6c 70 3a 21 4d 65 6e | 75 0a 23 54 61 62 6c 65 |elp:!Men|u.#Table|
|00001cd0| 20 43 6f 6c 75 6d 6e 73 | 20 32 0a 3c 50 52 4f 43 | Columns| 2.<PROC|
|00001ce0| 69 6e 69 74 68 65 61 70 | 3e 0a 3c 50 52 4f 43 68 |initheap|>.<PROCh|
|00001cf0| 65 61 70 5f 66 72 65 65 | 3e 0a 3c 46 4e 63 6c 61 |eap_free|>.<FNcla|
|00001d00| 69 6d 52 4d 41 3e 0a 3c | 46 4e 63 6c 61 69 6d 3e |imRMA>.<|FNclaim>|
|00001d10| 0a 3c 50 52 4f 43 72 65 | 6c 65 61 73 65 3e 0a 3c |.<PROCre|lease>.<|
|00001d20| 46 4e 65 78 74 65 6e 64 | 3e 0a 3c 50 52 4f 43 6c |FNextend|>.<PROCl|
|00001d30| 6f 63 6b 62 6c 6f 63 6b | 3e 0a 3c 50 52 4f 43 75 |ockblock|>.<PROCu|
|00001d40| 6e 6c 6f 63 6b 62 6c 6f | 63 6b 3e 0a 3c 50 52 4f |nlockblo|ck>.<PRO|
|00001d50| 43 68 65 61 70 5f 72 65 | 64 75 63 65 3e 0a 3c 50 |Cheap_re|duce>.<P|
|00001d60| 52 4f 43 68 65 61 70 5f | 67 61 72 62 61 67 65 3e |ROCheap_|garbage>|
|00001d70| 0a 3c 50 52 4f 43 68 65 | 61 70 5f 72 65 6c 6f 63 |.<PROChe|ap_reloc|
|00001d80| 61 74 65 3e 0a 3c 50 52 | 4f 43 68 65 61 70 5f 6f |ate>.<PR|OCheap_o|
|00001d90| 6b 74 6f 6d 6f 76 65 3e | 0a 23 45 6e 64 54 61 62 |ktomove>|.#EndTab|
|00001da0| 6c 65 0a 0a 3c 49 6e 66 | 6f 72 6d 61 74 69 6f 6e |le..<Inf|ormation|
|00001db0| 3d 3e 69 6e 66 6f 3e 20 | 6f 6e 20 48 65 61 70 4c |=>info> |on HeapL|
|00001dc0| 69 62 0a 00 44 41 54 41 | 10 03 00 00 48 65 61 70 |ib..DATA|....Heap|
|00001dd0| 4c 69 62 20 68 65 6c 70 | 0a 23 41 6c 69 67 6e 20 |Lib help|.#Align |
|00001de0| 43 65 6e 74 72 65 0a 7b | 66 68 33 7d 4a 46 53 68 |Centre.{|fh3}JFSh|
|00001df0| 61 72 65 64 20 48 65 61 | 70 4c 69 62 20 76 31 2e |ared Hea|pLib v1.|
|00001e00| 30 32 7b 66 7d 0a 23 41 | 6c 69 67 6e 20 4c 65 66 |02{f}.#A|lign Lef|
|00001e10| 74 0a 0a 54 68 65 20 48 | 65 61 70 20 4c 69 62 72 |t..The H|eap Libr|
|00001e20| 61 72 79 20 69 73 20 61 | 20 42 61 73 69 63 20 4c |ary is a| Basic L|
|00001e30| 69 62 72 61 72 79 20 66 | 69 6c 65 20 77 68 69 63 |ibrary f|ile whic|
|00001e40| 68 20 70 72 6f 76 69 64 | 65 73 20 73 69 6d 70 6c |h provid|es simpl|
|00001e50| 65 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6c 6c |e proced|ure call|
|00001e60| 73 20 74 6f 20 67 69 76 | 65 20 63 6f 6e 74 72 6f |s to giv|e contro|
|00001e70| 6c 20 6f 76 65 72 20 6d | 65 6d 6f 72 79 20 6d 61 |l over m|emory ma|
|00001e80| 6e 61 67 65 6d 65 6e 74 | 2e 20 49 6e 20 63 6f 6e |nagement|. In con|
|00001e90| 6a 75 6e 63 74 69 6f 6e | 20 77 69 74 68 20 74 68 |junction| with th|
|00001ea0| 65 20 4a 46 53 68 61 72 | 65 64 20 73 6b 65 6c 65 |e JFShar|ed skele|
|00001eb0| 74 6f 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |ton appl|ication |
|00001ec0| 61 6e 64 20 57 69 6d 70 | 4c 69 62 20 74 68 69 73 |and Wimp|Lib this|
|00001ed0| 20 70 72 6f 76 69 64 65 | 73 20 75 73 65 66 75 6c | provide|s useful|
|00001ee0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 6d 65 6d | applica|tion mem|
|00001ef0| 6f 72 79 20 6d 61 6e 61 | 67 65 6d 65 6e 74 2e 20 |ory mana|gement. |
|00001f00| 54 68 69 73 20 68 65 6c | 70 20 66 69 6c 65 20 64 |This hel|p file d|
|00001f10| 65 74 61 69 6c 73 20 74 | 68 65 20 72 6f 75 74 69 |etails t|he routi|
|00001f20| 6e 65 73 20 70 72 6f 76 | 69 64 65 64 20 69 6e 20 |nes prov|ided in |
|00001f30| 48 65 61 70 4c 69 62 2e | 0a 0a 54 68 65 20 48 65 |HeapLib.|..The He|
|00001f40| 61 70 20 4c 69 62 72 61 | 72 79 20 69 73 20 72 65 |ap Libra|ry is re|
|00001f50| 66 65 72 65 6e 63 65 64 | 20 62 79 20 5c 3c 48 65 |ferenced| by \<He|
|00001f60| 61 70 4c 69 62 72 61 72 | 79 24 46 69 6c 65 3e 20 |apLibrar|y$File> |
|00001f70| 61 6e 64 20 73 68 6f 75 | 6c 64 20 62 65 20 6c 6f |and shou|ld be lo|
|00001f80| 61 64 65 64 20 77 69 74 | 68 20 3a 0a 7b 66 43 6f |aded wit|h :.{fCo|
|00001f90| 64 65 7d 4c 49 42 52 41 | 52 59 20 22 5c 3c 48 65 |de}LIBRA|RY "\<He|
|00001fa0| 61 70 4c 69 62 72 61 72 | 79 24 46 69 6c 65 3e 22 |apLibrar|y$File>"|
|00001fb0| 3a 50 52 4f 43 69 6e 69 | 74 68 65 61 70 7b 66 7d |:PROCini|theap{f}|
|00001fc0| 0a 0a 54 68 65 20 4a 46 | 53 68 61 72 65 64 20 61 |..The JF|Shared a|
|00001fd0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 69 73 20 a9 20 |pplicati|on is . |
|00001fe0| 3c 4a 75 73 74 69 6e 20 | 46 6c 65 74 63 68 65 72 |<Justin |Fletcher|
|00001ff0| 3d 3e 46 69 6c 65 74 79 | 70 65 73 3a 41 75 74 68 |=>Filety|pes:Auth|
|00002000| 6f 72 73 5f 4a 75 73 74 | 69 6e 46 6c 65 74 63 68 |ors_Just|inFletch|
|00002010| 65 72 3e 2c 20 31 39 39 | 35 20 61 6e 64 20 69 73 |er>, 199|5 and is|
|00002020| 20 72 65 6c 65 61 73 65 | 64 20 69 6e 74 6f 20 74 | release|d into t|
|00002030| 68 65 20 50 75 62 6c 69 | 63 20 44 6f 6d 61 69 6e |he Publi|c Domain|
|00002040| 20 77 69 74 68 20 74 68 | 65 20 73 61 6d 65 20 72 | with th|e same r|
|00002050| 65 73 74 72 69 63 74 69 | 6f 6e 73 20 61 73 20 73 |estricti|ons as s|
|00002060| 75 62 73 69 73 74 20 69 | 6e 20 6d 6f 73 74 20 50 |ubsist i|n most P|
|00002070| 44 20 73 6f 66 74 77 61 | 72 65 2e 20 54 68 69 73 |D softwa|re. This|
|00002080| 20 69 6e 63 6c 75 64 65 | 73 20 74 68 65 20 66 61 | include|s the fa|
|00002090| 63 74 20 74 68 61 74 20 | 77 68 65 6e 20 64 69 73 |ct that |when dis|
|000020a0| 74 72 69 62 75 74 65 64 | 20 74 68 65 20 65 6e 74 |tributed| the ent|
|000020b0| 69 72 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |ire appl|ication |
|000020c0| 6d 75 73 74 20 72 65 6d | 61 69 6e 20 69 6e 74 61 |must rem|ain inta|
|000020d0| 63 74 2e 0a | |ct.. | |
+--------+-------------------------+-------------------------+--------+--------+