home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 67 72 61 79 | 40 61 6e 74 61 69 72 65 |om: gray|@antaire|
|00000030| 2e 63 6f 6d 20 28 47 72 | 61 79 20 57 61 74 73 6f |.com (Gr|ay Watso|
|00000040| 6e 29 0a 53 75 62 6a 65 | 63 74 3a 20 76 32 36 69 |n).Subje|ct: v26i|
|00000050| 31 30 32 3a 20 6d 61 6c | 6c 6f 63 20 2d 20 64 65 |102: mal|loc - de|
|00000060| 62 75 67 67 69 6e 67 20 | 76 65 72 73 69 6f 6e 20 |bugging |version |
|00000070| 6f 66 20 6d 61 6c 6c 6f | 63 2c 20 56 31 2e 32 2e |of mallo|c, V1.2.|
|00000080| 30 2c 20 50 61 72 74 30 | 35 2f 30 35 0a 53 65 6e |0, Part0|5/05.Sen|
|00000090| 64 65 72 3a 20 75 6e 69 | 78 2d 73 6f 75 72 63 65 |der: uni|x-source|
|000000a0| 73 2d 6d 6f 64 65 72 61 | 74 6f 72 40 76 69 78 2e |s-modera|tor@vix.|
|000000b0| 63 6f 6d 0a 41 70 70 72 | 6f 76 65 64 3a 20 70 61 |com.Appr|oved: pa|
|000000c0| 75 6c 40 76 69 78 2e 63 | 6f 6d 0a 0a 53 75 62 6d |ul@vix.c|om..Subm|
|000000d0| 69 74 74 65 64 2d 42 79 | 3a 20 67 72 61 79 40 61 |itted-By|: gray@a|
|000000e0| 6e 74 61 69 72 65 2e 63 | 6f 6d 20 28 47 72 61 79 |ntaire.c|om (Gray|
|000000f0| 20 57 61 74 73 6f 6e 29 | 0a 50 6f 73 74 69 6e 67 | Watson)|.Posting|
|00000100| 2d 4e 75 6d 62 65 72 3a | 20 56 6f 6c 75 6d 65 20 |-Number:| Volume |
|00000110| 32 36 2c 20 49 73 73 75 | 65 20 31 30 32 0a 41 72 |26, Issu|e 102.Ar|
|00000120| 63 68 69 76 65 2d 4e 61 | 6d 65 3a 20 6d 61 6c 6c |chive-Na|me: mall|
|00000130| 6f 63 2d 31 2e 32 2e 30 | 2f 70 61 72 74 30 35 0a |oc-1.2.0|/part05.|
|00000140| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|00000150| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|00000160| 63 68 69 76 65 2e 20 20 | 52 65 6d 6f 76 65 20 61 |chive. |Remove a|
|00000170| 6e 79 74 68 69 6e 67 20 | 62 65 66 6f 72 65 20 74 |nything |before t|
|00000180| 68 69 73 20 6c 69 6e 65 | 2c 20 74 68 65 6e 20 75 |his line|, then u|
|00000190| 6e 70 61 63 6b 0a 23 20 | 69 74 20 62 79 20 73 61 |npack.# |it by sa|
|000001a0| 76 69 6e 67 20 69 74 20 | 69 6e 74 6f 20 61 20 66 |ving it |into a f|
|000001b0| 69 6c 65 20 61 6e 64 20 | 74 79 70 69 6e 67 20 22 |ile and |typing "|
|000001c0| 73 68 20 66 69 6c 65 22 | 2e 20 20 54 6f 20 6f 76 |sh file"|. To ov|
|000001d0| 65 72 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |erwrite |existing|
|000001e0| 0a 23 20 66 69 6c 65 73 | 2c 20 74 79 70 65 20 22 |.# files|, type "|
|000001f0| 73 68 20 66 69 6c 65 20 | 2d 63 22 2e 20 20 59 6f |sh file |-c". Yo|
|00000200| 75 20 63 61 6e 20 61 6c | 73 6f 20 66 65 65 64 20 |u can al|so feed |
|00000210| 74 68 69 73 20 61 73 20 | 73 74 61 6e 64 61 72 64 |this as |standard|
|00000220| 20 69 6e 70 75 74 20 76 | 69 61 0a 23 20 75 6e 73 | input v|ia.# uns|
|00000230| 68 61 72 2c 20 6f 72 20 | 62 79 20 74 79 70 69 6e |har, or |by typin|
|00000240| 67 20 22 73 68 20 3c 66 | 69 6c 65 22 2c 20 65 2e |g "sh <f|ile", e.|
|00000250| 67 2e 2e 20 20 49 66 20 | 74 68 69 73 20 61 72 63 |g.. If |this arc|
|00000260| 68 69 76 65 20 69 73 20 | 63 6f 6d 70 6c 65 74 65 |hive is |complete|
|00000270| 2c 20 79 6f 75 0a 23 20 | 77 69 6c 6c 20 73 65 65 |, you.# |will see|
|00000280| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|00000290| 65 73 73 61 67 65 20 61 | 74 20 74 68 65 20 65 6e |essage a|t the en|
|000002a0| 64 3a 0a 23 09 09 22 45 | 6e 64 20 6f 66 20 61 72 |d:.#.."E|nd of ar|
|000002b0| 63 68 69 76 65 20 35 20 | 28 6f 66 20 35 29 2e 22 |chive 5 |(of 5)."|
|000002c0| 0a 23 20 43 6f 6e 74 65 | 6e 74 73 3a 20 20 63 6f |.# Conte|nts: co|
|000002d0| 6e 66 69 67 75 72 65 2e | 69 6e 20 64 62 67 5f 74 |nfigure.|in dbg_t|
|000002e0| 6f 6b 65 6e 73 2e 68 20 | 64 62 67 5f 76 61 6c 75 |okens.h |dbg_valu|
|000002f0| 65 73 2e 68 20 68 65 61 | 70 2e 63 20 68 65 61 70 |es.h hea|p.c heap|
|00000300| 2e 68 0a 23 20 20 20 6d | 61 6c 6c 6f 63 2e 68 20 |.h.# m|alloc.h |
|00000310| 6d 61 6c 6c 6f 63 5f 64 | 62 67 2e 63 20 6d 61 6c |malloc_d|bg.c mal|
|00000320| 6c 6f 63 5f 6c 6f 63 2e | 68 20 6d 61 6c 6c 6f 63 |loc_loc.|h malloc|
|00000330| 5f 6c 70 2e 63 20 6d 61 | 6c 6c 6f 63 5f 6c 70 2e |_lp.c ma|lloc_lp.|
|00000340| 68 0a 23 20 20 20 6d 61 | 6c 6c 6f 63 5f 73 74 72 |h.# ma|lloc_str|
|00000350| 2e 63 20 6d 61 6c 6c 6f | 63 5f 73 74 72 2e 68 20 |.c mallo|c_str.h |
|00000360| 73 61 6d 70 6c 65 2e 63 | 20 76 65 72 73 69 6f 6e |sample.c| version|
|00000370| 2e 68 0a 23 20 57 72 61 | 70 70 65 64 20 62 79 20 |.h.# Wra|pped by |
|00000380| 67 72 61 79 40 74 6f 61 | 73 74 65 72 2e 61 6e 74 |gray@toa|ster.ant|
|00000390| 61 69 72 65 2e 63 6f 6d | 20 6f 6e 20 54 75 65 20 |aire.com| on Tue |
|000003a0| 41 70 72 20 20 36 20 30 | 31 3a 32 34 3a 30 37 20 |Apr 6 0|1:24:07 |
|000003b0| 31 39 39 33 0a 50 41 54 | 48 3d 2f 62 69 6e 3a 2f |1993.PAT|H=/bin:/|
|000003c0| 75 73 72 2f 62 69 6e 3a | 2f 75 73 72 2f 75 63 62 |usr/bin:|/usr/ucb|
|000003d0| 20 3b 20 65 78 70 6f 72 | 74 20 50 41 54 48 0a 69 | ; expor|t PATH.i|
|000003e0| 66 20 74 65 73 74 20 2d | 66 20 27 63 6f 6e 66 69 |f test -|f 'confi|
|000003f0| 67 75 72 65 2e 69 6e 27 | 20 2d 61 20 22 24 7b 31 |gure.in'| -a "${1|
|00000400| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00000410| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00000420| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00000430| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00000440| 22 27 63 6f 6e 66 69 67 | 75 72 65 2e 69 6e 27 5c |"'config|ure.in'\|
|00000450| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00000460| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00000470| 63 6f 6e 66 69 67 75 72 | 65 2e 69 6e 27 5c 22 20 |configur|e.in'\" |
|00000480| 5c 28 31 37 31 31 20 63 | 68 61 72 61 63 74 65 72 |\(1711 c|haracter|
|00000490| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|000004a0| 20 3e 27 63 6f 6e 66 69 | 67 75 72 65 2e 69 6e 27 | >'confi|gure.in'|
|000004b0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|000004c0| 0a 58 64 6e 6c 0a 58 64 | 6e 6c 20 50 72 6f 63 65 |.Xdnl.Xd|nl Proce|
|000004d0| 73 73 20 74 68 69 73 20 | 66 69 6c 65 20 77 69 74 |ss this |file wit|
|000004e0| 68 20 61 75 74 6f 63 6f | 6e 66 20 74 6f 20 70 72 |h autoco|nf to pr|
|000004f0| 6f 64 75 63 65 20 61 20 | 63 6f 6e 66 69 67 75 72 |oduce a |configur|
|00000500| 65 20 73 63 72 69 70 74 | 2e 0a 58 64 6e 6c 20 43 |e script|..Xdnl C|
|00000510| 6f 70 79 72 69 67 68 74 | 20 31 39 39 32 20 62 79 |opyright| 1992 by|
|00000520| 20 47 72 61 79 20 57 61 | 74 73 6f 6e 20 61 6e 64 | Gray Wa|tson and|
|00000530| 20 74 68 65 20 41 6e 74 | 61 69 72 65 20 43 6f 72 | the Ant|aire Cor|
|00000540| 70 6f 72 61 74 69 6f 6e | 0a 58 64 6e 6c 0a 58 41 |poration|.Xdnl.XA|
|00000550| 43 5f 49 4e 49 54 28 6d | 61 6c 6c 6f 63 2e 63 29 |C_INIT(m|alloc.c)|
|00000560| 0a 58 41 43 5f 43 4f 4e | 46 49 47 5f 48 45 41 44 |.XAC_CON|FIG_HEAD|
|00000570| 45 52 28 63 6f 6e 66 2e | 68 29 0a 58 64 6e 6c 0a |ER(conf.|h).Xdnl.|
|00000580| 58 65 63 68 6f 20 43 6f | 6e 66 69 67 75 72 69 6e |Xecho Co|nfigurin|
|00000590| 67 20 66 6f 72 20 74 68 | 65 20 6d 61 6c 6c 6f 63 |g for th|e malloc|
|000005a0| 2d 64 65 62 75 67 20 6c | 69 62 72 61 72 79 0a 58 |-debug l|ibrary.X|
|000005b0| 65 63 68 6f 20 2e 0a 58 | 65 63 68 6f 20 63 68 65 |echo ..X|echo che|
|000005c0| 63 6b 69 6e 67 20 70 72 | 6f 67 72 61 6d 73 3a 0a |cking pr|ograms:.|
|000005d0| 58 41 43 5f 50 52 4f 47 | 5f 43 43 0a 58 41 43 5f |XAC_PROG|_CC.XAC_|
|000005e0| 50 52 4f 47 5f 49 4e 53 | 54 41 4c 4c 0a 58 41 43 |PROG_INS|TALL.XAC|
|000005f0| 5f 50 52 4f 47 5f 52 41 | 4e 4c 49 42 0a 58 64 6e |_PROG_RA|NLIB.Xdn|
|00000600| 6c 0a 58 65 63 68 6f 20 | 2e 0a 58 65 63 68 6f 20 |l.Xecho |..Xecho |
|00000610| 63 68 65 63 6b 69 6e 67 | 20 66 75 6e 63 74 69 6f |checking| functio|
|00000620| 6e 73 3a 0a 58 41 43 5f | 48 41 56 45 5f 46 55 4e |ns:.XAC_|HAVE_FUN|
|00000630| 43 53 28 62 63 6d 70 20 | 62 63 6f 70 79 20 6d 65 |CS(bcmp |bcopy me|
|00000640| 6d 63 6d 70 20 6d 65 6d | 63 70 79 20 6d 65 6d 73 |mcmp mem|cpy mems|
|00000650| 65 74 29 0a 58 64 6e 6c | 20 74 68 69 73 20 69 73 |et).Xdnl| this is|
|00000660| 20 6e 65 63 65 73 73 61 | 72 79 20 62 65 63 61 75 | necessa|ry becau|
|00000670| 73 65 20 69 6e 64 65 78 | 20 69 73 20 61 20 6d 34 |se index| is a m4|
|00000680| 20 66 75 6e 63 74 69 6f | 6e 0a 58 65 63 68 6f 20 | functio|n.Xecho |
|00000690| 63 68 65 63 6b 69 6e 67 | 20 66 6f 72 20 5f 69 6e |checking| for _in|
|000006a0| 64 65 78 0a 58 41 43 5f | 54 45 53 54 5f 50 52 4f |dex.XAC_|TEST_PRO|
|000006b0| 47 52 41 4d 28 5b 0a 58 | 6d 61 69 6e 28 29 20 7b |GRAM([.X|main() {|
|000006c0| 20 65 78 69 74 28 30 29 | 3b 20 7d 0a 58 74 28 29 | exit(0)|; }.Xt()|
|000006d0| 20 7b 0a 58 23 69 66 64 | 65 66 20 5f 5f 73 74 75 | {.X#ifd|ef __stu|
|000006e0| 62 5f 69 6e 64 65 78 0a | 58 63 68 6f 6b 65 20 6d |b_index.|Xchoke m|
|000006f0| 65 0a 58 23 65 6c 73 65 | 0a 58 2f 2a 20 4f 76 65 |e.X#else|.X/* Ove|
|00000700| 72 72 69 64 65 20 61 6e | 79 20 67 63 63 32 20 69 |rride an|y gcc2 i|
|00000710| 6e 74 65 72 6e 61 6c 20 | 70 72 6f 74 6f 74 79 70 |nternal |prototyp|
|00000720| 65 20 74 6f 20 61 76 6f | 69 64 20 61 6e 20 65 72 |e to avo|id an er|
|00000730| 72 6f 72 2e 20 20 2a 2f | 0a 58 65 78 74 65 72 6e |ror. */|.Xextern|
|00000740| 20 63 68 61 72 20 69 6e | 64 65 78 28 29 3b 20 69 | char in|dex(); i|
|00000750| 6e 64 65 78 28 29 3b 0a | 58 23 65 6e 64 69 66 0a |ndex();.|X#endif.|
|00000760| 58 20 7d 0a 58 5d 2c 20 | 5b 0a 58 41 43 5f 44 45 |X }.X], |[.XAC_DE|
|00000770| 46 49 4e 45 28 48 41 56 | 45 5f 49 4e 44 45 58 2c |FINE(HAV|E_INDEX,|
|00000780| 20 31 29 0a 58 5d 2c 20 | 5b 0a 58 41 43 5f 44 45 | 1).X], |[.XAC_DE|
|00000790| 46 49 4e 45 28 48 41 56 | 45 5f 49 4e 44 45 58 2c |FINE(HAV|E_INDEX,|
|000007a0| 20 30 29 0a 58 5d 29 0a | 58 41 43 5f 48 41 56 45 | 0).X]).|XAC_HAVE|
|000007b0| 5f 46 55 4e 43 53 28 72 | 69 6e 64 65 78 29 0a 58 |_FUNCS(r|index).X|
|000007c0| 41 43 5f 48 41 56 45 5f | 46 55 4e 43 53 28 73 74 |AC_HAVE_|FUNCS(st|
|000007d0| 72 63 61 74 20 73 74 72 | 63 6d 70 20 73 74 72 6c |rcat str|cmp strl|
|000007e0| 65 6e 20 73 74 72 74 6f | 6b 29 0a 58 65 63 68 6f |en strto|k).Xecho|
|000007f0| 20 2e 0a 58 65 63 68 6f | 20 63 68 65 63 6b 69 6e | ..Xecho| checkin|
|00000800| 67 20 76 61 72 69 6f 75 | 73 20 66 75 6e 63 74 69 |g variou|s functi|
|00000810| 6f 6e 73 20 66 6f 72 20 | 73 74 72 69 6e 67 20 63 |ons for |string c|
|00000820| 68 65 63 6b 69 6e 67 0a | 58 41 43 5f 48 41 56 45 |hecking.|XAC_HAVE|
|00000830| 5f 46 55 4e 43 53 28 62 | 7a 65 72 6f 29 0a 58 41 |_FUNCS(b|zero).XA|
|00000840| 43 5f 48 41 56 45 5f 46 | 55 4e 43 53 28 6d 65 6d |C_HAVE_F|UNCS(mem|
|00000850| 63 63 70 79 20 6d 65 6d | 63 68 72 29 0a 58 41 43 |ccpy mem|chr).XAC|
|00000860| 5f 48 41 56 45 5f 46 55 | 4e 43 53 28 73 74 72 63 |_HAVE_FU|NCS(strc|
|00000870| 68 72 20 73 74 72 72 63 | 68 72 20 73 74 72 63 70 |hr strrc|hr strcp|
|00000880| 79 20 73 74 72 6e 63 70 | 79 20 73 74 72 63 61 73 |y strncp|y strcas|
|00000890| 65 63 6d 70 20 73 74 72 | 6e 63 61 73 65 63 6d 70 |ecmp str|ncasecmp|
|000008a0| 29 0a 58 41 43 5f 48 41 | 56 45 5f 46 55 4e 43 53 |).XAC_HA|VE_FUNCS|
|000008b0| 28 73 74 72 73 70 6e 20 | 73 74 72 63 73 70 6e 20 |(strspn |strcspn |
|000008c0| 73 74 72 6e 63 61 74 20 | 73 74 72 6e 63 6d 70 20 |strncat |strncmp |
|000008d0| 73 74 72 70 62 72 6b 20 | 73 74 72 73 74 72 29 0a |strpbrk |strstr).|
|000008e0| 58 64 6e 6c 0a 58 65 63 | 68 6f 20 2e 0a 58 65 63 |Xdnl.Xec|ho ..Xec|
|000008f0| 68 6f 20 50 4c 45 41 53 | 45 20 57 41 54 43 48 3a |ho PLEAS|E WATCH:|
|00000900| 20 63 68 65 63 6b 69 6e | 67 20 66 6f 72 20 76 65 | checkin|g for ve|
|00000910| 72 79 20 69 6d 70 6f 72 | 74 61 6e 74 20 66 75 6e |ry impor|tant fun|
|00000920| 63 74 69 6f 6e 61 6c 69 | 74 79 3a 0a 58 41 43 5f |ctionali|ty:.XAC_|
|00000930| 48 41 56 45 5f 46 55 4e | 43 53 28 73 62 72 6b 29 |HAVE_FUN|CS(sbrk)|
|00000940| 0a 58 65 63 68 6f 20 63 | 68 65 63 6b 69 6e 67 20 |.Xecho c|hecking |
|00000950| 66 6f 72 20 68 65 61 70 | 20 6f 72 64 65 72 69 6e |for heap| orderin|
|00000960| 67 2e 2e 2e 0a 58 41 43 | 5f 54 45 53 54 5f 50 52 |g....XAC|_TEST_PR|
|00000970| 4f 47 52 41 4d 28 5b 0a | 58 6d 61 69 6e 28 29 0a |OGRAM([.|Xmain().|
|00000980| 58 7b 0a 58 20 20 63 68 | 61 72 09 2a 20 66 69 72 |X{.X ch|ar.* fir|
|00000990| 73 74 2c 20 2a 6e 65 78 | 74 3b 0a 58 20 20 66 69 |st, *nex|t;.X fi|
|000009a0| 72 73 74 20 3d 20 73 62 | 72 6b 28 31 30 32 34 29 |rst = sb|rk(1024)|
|000009b0| 3b 0a 58 20 20 6e 65 78 | 74 20 3d 20 73 62 72 6b |;.X nex|t = sbrk|
|000009c0| 28 31 30 32 34 29 3b 0a | 58 20 20 69 66 20 28 6e |(1024);.|X if (n|
|000009d0| 65 78 74 20 3e 20 66 69 | 72 73 74 29 0a 58 20 20 |ext > fi|rst).X |
|000009e0| 20 20 65 78 69 74 28 30 | 29 3b 0a 58 20 20 65 6c | exit(0|);.X el|
|000009f0| 73 65 0a 58 20 20 20 20 | 65 78 69 74 28 31 29 3b |se.X |exit(1);|
|00000a00| 0a 58 7d 0a 58 5d 2c 20 | 5b 0a 58 41 43 5f 44 45 |.X}.X], |[.XAC_DE|
|00000a10| 46 49 4e 45 28 48 45 41 | 50 5f 47 52 4f 57 53 5f |FINE(HEA|P_GROWS_|
|00000a20| 55 50 2c 20 31 29 0a 58 | 65 63 68 6f 20 27 20 20 |UP, 1).X|echo ' |
|00000a30| 20 46 59 49 3a 20 79 6f | 75 72 20 68 65 61 70 20 | FYI: yo|ur heap |
|00000a40| 73 65 65 6d 73 20 74 6f | 20 67 72 6f 77 20 75 70 |seems to| grow up|
|00000a50| 2e 27 0a 58 5d 2c 20 5b | 0a 58 41 43 5f 44 45 46 |.'.X], [|.XAC_DEF|
|00000a60| 49 4e 45 28 48 45 41 50 | 5f 47 52 4f 57 53 5f 55 |INE(HEAP|_GROWS_U|
|00000a70| 50 2c 20 30 29 0a 58 65 | 63 68 6f 20 27 20 20 20 |P, 0).Xe|cho ' |
|00000a80| 46 59 49 3a 20 79 6f 75 | 72 20 68 65 61 70 20 73 |FYI: you|r heap s|
|00000a90| 65 65 6d 73 20 74 6f 20 | 67 72 6f 77 20 64 6f 77 |eems to |grow dow|
|00000aa0| 6e 2e 27 0a 58 65 63 68 | 6f 20 27 20 20 20 57 41 |n.'.Xech|o ' WA|
|00000ab0| 52 4e 49 4e 47 3a 20 74 | 68 65 20 6c 69 62 72 61 |RNING: t|he libra|
|00000ac0| 72 79 20 68 61 73 20 6c | 69 74 74 6c 65 20 73 75 |ry has l|ittle su|
|00000ad0| 70 70 6f 72 74 20 66 6f | 72 20 74 68 69 73 2e 27 |pport fo|r this.'|
|00000ae0| 0a 58 5d 29 0a 58 64 6e | 6c 0a 58 65 63 68 6f 20 |.X]).Xdn|l.Xecho |
|00000af0| 2e 0a 58 41 43 5f 4f 55 | 54 50 55 54 28 4d 61 6b |..XAC_OU|TPUT(Mak|
|00000b00| 65 66 69 6c 65 29 0a 58 | 65 63 68 6f 20 2e 0a 58 |efile).X|echo ..X|
|00000b10| 65 63 68 6f 20 44 6f 6e | 65 21 21 0a 58 65 63 68 |echo Don|e!!.Xech|
|00000b20| 6f 20 63 72 65 61 74 65 | 64 20 63 6f 6e 66 2e 68 |o create|d conf.h|
|00000b30| 20 61 6e 64 20 4d 61 6b | 65 66 69 6c 65 2e 0a 58 | and Mak|efile..X|
|00000b40| 65 63 68 6f 20 50 6c 65 | 61 73 65 20 63 68 65 63 |echo Ple|ase chec|
|00000b50| 6b 2d 6f 75 74 20 4d 61 | 6b 65 66 69 6c 65 20 61 |k-out Ma|kefile a|
|00000b60| 6e 64 20 65 73 70 65 63 | 69 61 6c 6c 79 20 63 6f |nd espec|ially co|
|00000b70| 6e 66 2e 68 20 74 6f 20 | 6d 61 6b 65 20 73 75 72 |nf.h to |make sur|
|00000b80| 65 20 74 68 61 74 0a 58 | 65 63 68 6f 20 20 20 20 |e that.X|echo |
|00000b90| 20 73 61 6e 65 20 63 6f | 6e 66 69 67 75 72 61 74 | sane co|nfigurat|
|00000ba0| 69 6f 6e 20 76 61 6c 75 | 65 73 20 77 65 72 65 20 |ion valu|es were |
|00000bb0| 61 20 72 65 73 75 6c 74 | 2e 0a 45 4e 44 5f 4f 46 |a result|..END_OF|
|00000bc0| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 31 37 |_FILE.if| test 17|
|00000bd0| 31 31 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |11 -ne `|wc -c <'|
|00000be0| 63 6f 6e 66 69 67 75 72 | 65 2e 69 6e 27 60 3b 20 |configur|e.in'`; |
|00000bf0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00000c00| 61 72 3a 20 5c 22 27 63 | 6f 6e 66 69 67 75 72 65 |ar: \"'c|onfigure|
|00000c10| 2e 69 6e 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |.in'\" u|npacked |
|00000c20| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00000c30| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 63 6f |.fi.# en|d of 'co|
|00000c40| 6e 66 69 67 75 72 65 2e | 69 6e 27 0a 66 69 0a 69 |nfigure.|in'.fi.i|
|00000c50| 66 20 74 65 73 74 20 2d | 66 20 27 64 62 67 5f 74 |f test -|f 'dbg_t|
|00000c60| 6f 6b 65 6e 73 2e 68 27 | 20 2d 61 20 22 24 7b 31 |okens.h'| -a "${1|
|00000c70| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00000c80| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00000c90| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00000ca0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00000cb0| 22 27 64 62 67 5f 74 6f | 6b 65 6e 73 2e 68 27 5c |"'dbg_to|kens.h'\|
|00000cc0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00000cd0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00000ce0| 64 62 67 5f 74 6f 6b 65 | 6e 73 2e 68 27 5c 22 20 |dbg_toke|ns.h'\" |
|00000cf0| 5c 28 32 32 39 33 20 63 | 68 61 72 61 63 74 65 72 |\(2293 c|haracter|
|00000d00| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000d10| 20 3e 27 64 62 67 5f 74 | 6f 6b 65 6e 73 2e 68 27 | >'dbg_t|okens.h'|
|00000d20| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00000d30| 0a 58 2f 2a 0a 58 20 2a | 20 74 6f 6b 65 6e 73 20 |.X/*.X *| tokens |
|00000d40| 61 74 74 72 69 62 75 74 | 65 73 20 66 6f 72 20 74 |attribut|es for t|
|00000d50| 68 65 20 6d 61 6c 6c 6f | 63 5f 64 62 67 20 70 72 |he mallo|c_dbg pr|
|00000d60| 6f 67 72 61 6d 0a 58 20 | 2a 0a 58 20 2a 20 43 6f |ogram.X |*.X * Co|
|00000d70| 70 79 72 69 67 68 74 20 | 31 39 39 32 20 62 79 20 |pyright |1992 by |
|00000d80| 47 72 61 79 20 57 61 74 | 73 6f 6e 20 61 6e 64 20 |Gray Wat|son and |
|00000d90| 74 68 65 20 41 6e 74 61 | 69 72 65 20 43 6f 72 70 |the Anta|ire Corp|
|00000da0| 6f 72 61 74 69 6f 6e 0a | 58 20 2a 0a 58 20 2a 20 |oration.|X *.X * |
|00000db0| 54 68 69 73 20 66 69 6c | 65 20 69 73 20 70 61 72 |This fil|e is par|
|00000dc0| 74 20 6f 66 20 74 68 65 | 20 6d 61 6c 6c 6f 63 2d |t of the| malloc-|
|00000dd0| 64 65 62 75 67 20 70 61 | 63 6b 61 67 65 2e 0a 58 |debug pa|ckage..X|
|00000de0| 20 2a 0a 58 20 2a 20 54 | 68 69 73 20 6c 69 62 72 | *.X * T|his libr|
|00000df0| 61 72 79 20 69 73 20 66 | 72 65 65 20 73 6f 66 74 |ary is f|ree soft|
|00000e00| 77 61 72 65 3b 20 79 6f | 75 20 63 61 6e 20 72 65 |ware; yo|u can re|
|00000e10| 64 69 73 74 72 69 62 75 | 74 65 20 69 74 20 61 6e |distribu|te it an|
|00000e20| 64 2f 6f 72 0a 58 20 2a | 20 6d 6f 64 69 66 79 20 |d/or.X *| modify |
|00000e30| 69 74 20 75 6e 64 65 72 | 20 74 68 65 20 74 65 72 |it under| the ter|
|00000e40| 6d 73 20 6f 66 20 74 68 | 65 20 47 4e 55 20 4c 69 |ms of th|e GNU Li|
|00000e50| 62 72 61 72 79 20 47 65 | 6e 65 72 61 6c 20 50 75 |brary Ge|neral Pu|
|00000e60| 62 6c 69 63 0a 58 20 2a | 20 4c 69 63 65 6e 73 65 |blic.X *| License|
|00000e70| 20 61 73 20 70 75 62 6c | 69 73 68 65 64 20 62 79 | as publ|ished by|
|00000e80| 20 74 68 65 20 46 72 65 | 65 20 53 6f 66 74 77 61 | the Fre|e Softwa|
|00000e90| 72 65 20 46 6f 75 6e 64 | 61 74 69 6f 6e 3b 20 65 |re Found|ation; e|
|00000ea0| 69 74 68 65 72 0a 58 20 | 2a 20 76 65 72 73 69 6f |ither.X |* versio|
|00000eb0| 6e 20 32 20 6f 66 20 74 | 68 65 20 4c 69 63 65 6e |n 2 of t|he Licen|
|00000ec0| 73 65 2c 20 6f 72 20 28 | 61 74 20 79 6f 75 72 20 |se, or (|at your |
|00000ed0| 6f 70 74 69 6f 6e 29 20 | 61 6e 79 20 6c 61 74 65 |option) |any late|
|00000ee0| 72 20 76 65 72 73 69 6f | 6e 2e 0a 58 20 2a 0a 58 |r versio|n..X *.X|
|00000ef0| 20 2a 20 54 68 69 73 20 | 6c 69 62 72 61 72 79 20 | * This |library |
|00000f00| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 69 |is distr|ibuted i|
|00000f10| 6e 20 74 68 65 20 68 6f | 70 65 20 74 68 61 74 20 |n the ho|pe that |
|00000f20| 69 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 66 75 |it will |be usefu|
|00000f30| 6c 2c 0a 58 20 2a 20 62 | 75 74 20 57 49 54 48 4f |l,.X * b|ut WITHO|
|00000f40| 55 54 20 41 4e 59 20 57 | 41 52 52 41 4e 54 59 3b |UT ANY W|ARRANTY;|
|00000f50| 20 77 69 74 68 6f 75 74 | 20 65 76 65 6e 20 74 68 | without| even th|
|00000f60| 65 20 69 6d 70 6c 69 65 | 64 20 77 61 72 72 61 6e |e implie|d warran|
|00000f70| 74 79 20 6f 66 0a 58 20 | 2a 20 4d 45 52 43 48 41 |ty of.X |* MERCHA|
|00000f80| 4e 54 41 42 49 4c 49 54 | 59 20 6f 72 20 46 49 54 |NTABILIT|Y or FIT|
|00000f90| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|00000fa0| 43 55 4c 41 52 20 50 55 | 52 50 4f 53 45 2e 20 20 |CULAR PU|RPOSE. |
|00000fb0| 53 65 65 20 74 68 65 20 | 47 4e 55 0a 58 20 2a 20 |See the |GNU.X * |
|00000fc0| 4c 69 62 72 61 72 79 20 | 47 65 6e 65 72 61 6c 20 |Library |General |
|00000fd0| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 20 66 |Public L|icense f|
|00000fe0| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 2e |or more |details.|
|00000ff0| 0a 58 20 2a 0a 58 20 2a | 20 59 6f 75 20 73 68 6f |.X *.X *| You sho|
|00001000| 75 6c 64 20 68 61 76 65 | 20 72 65 63 65 69 76 65 |uld have| receive|
|00001010| 64 20 61 20 63 6f 70 79 | 20 6f 66 20 74 68 65 20 |d a copy| of the |
|00001020| 47 4e 55 20 4c 69 62 72 | 61 72 79 20 47 65 6e 65 |GNU Libr|ary Gene|
|00001030| 72 61 6c 20 50 75 62 6c | 69 63 0a 58 20 2a 20 4c |ral Publ|ic.X * L|
|00001040| 69 63 65 6e 73 65 20 61 | 6c 6f 6e 67 20 77 69 74 |icense a|long wit|
|00001050| 68 20 74 68 69 73 20 6c | 69 62 72 61 72 79 20 28 |h this l|ibrary (|
|00001060| 73 65 65 20 43 4f 50 59 | 49 4e 47 2d 4c 49 42 29 |see COPY|ING-LIB)|
|00001070| 3b 20 69 66 20 6e 6f 74 | 2c 20 77 72 69 74 65 20 |; if not|, write |
|00001080| 74 6f 20 74 68 65 0a 58 | 20 2a 20 46 72 65 65 20 |to the.X| * Free |
|00001090| 53 6f 66 74 77 61 72 65 | 20 46 6f 75 6e 64 61 74 |Software| Foundat|
|000010a0| 69 6f 6e 2c 20 49 6e 63 | 2e 2c 20 36 37 35 20 4d |ion, Inc|., 675 M|
|000010b0| 61 73 73 20 41 76 65 2c | 20 43 61 6d 62 72 69 64 |ass Ave,| Cambrid|
|000010c0| 67 65 2c 20 4d 41 20 30 | 32 31 33 39 2c 20 55 53 |ge, MA 0|2139, US|
|000010d0| 41 2e 0a 58 20 2a 0a 58 | 20 2a 20 54 68 65 20 61 |A..X *.X| * The a|
|000010e0| 75 74 68 6f 72 20 6f 66 | 20 74 68 65 20 70 72 6f |uthor of| the pro|
|000010f0| 67 72 61 6d 20 6d 61 79 | 20 62 65 20 63 6f 6e 74 |gram may| be cont|
|00001100| 61 63 74 65 64 20 61 74 | 20 67 72 61 79 2e 77 61 |acted at| gray.wa|
|00001110| 74 73 6f 6e 40 61 6e 74 | 61 69 72 65 2e 63 6f 6d |tson@ant|aire.com|
|00001120| 0a 58 20 2a 0a 58 20 2a | 20 24 49 64 3a 20 64 62 |.X *.X *| $Id: db|
|00001130| 67 5f 74 6f 6b 65 6e 73 | 2e 68 2c 76 20 31 2e 35 |g_tokens|.h,v 1.5|
|00001140| 20 31 39 39 33 2f 30 34 | 2f 30 35 20 32 32 3a 33 | 1993/04|/05 22:3|
|00001150| 30 3a 30 34 20 67 72 61 | 79 20 45 78 70 20 24 0a |0:04 gra|y Exp $.|
|00001160| 58 20 2a 2f 0a 58 0a 58 | 23 69 66 6e 64 65 66 20 |X */.X.X|#ifndef |
|00001170| 5f 5f 44 42 47 5f 54 4f | 4b 45 4e 53 5f 48 5f 5f |__DBG_TO|KENS_H__|
|00001180| 0a 58 23 64 65 66 69 6e | 65 20 5f 5f 44 42 47 5f |.X#defin|e __DBG_|
|00001190| 54 4f 4b 45 4e 53 5f 48 | 5f 5f 0a 58 0a 58 23 69 |TOKENS_H|__.X.X#i|
|000011a0| 6e 63 6c 75 64 65 20 22 | 6d 61 6c 6c 6f 63 2e 68 |nclude "|malloc.h|
|000011b0| 22 09 09 09 2f 2a 20 66 | 6f 72 20 4c 4f 43 41 4c |".../* f|or LOCAL|
|000011c0| 20 61 6e 64 20 62 6f 6f | 6c 20 73 74 75 66 66 20 | and boo|l stuff |
|000011d0| 2a 2f 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 64 62 |*/.X#inc|lude "db|
|000011e0| 67 5f 76 61 6c 75 65 73 | 2e 68 22 09 09 09 2f 2a |g_values|.h".../*|
|000011f0| 20 66 6f 72 20 64 65 62 | 75 67 20 63 6f 64 65 73 | for deb|ug codes|
|00001200| 20 2a 2f 0a 58 0a 58 74 | 79 70 65 64 65 66 20 73 | */.X.Xt|ypedef s|
|00001210| 74 72 75 63 74 20 7b 0a | 58 20 20 63 68 61 72 09 |truct {.|X char.|
|00001220| 09 2a 61 74 5f 73 74 72 | 69 6e 67 3b 09 09 2f 2a |.*at_str|ing;../*|
|00001230| 20 61 74 74 72 69 62 75 | 74 65 20 73 74 72 69 6e | attribu|te strin|
|00001240| 67 20 2a 2f 0a 58 20 20 | 69 6e 74 09 09 61 74 5f |g */.X |int..at_|
|00001250| 76 61 6c 75 65 3b 09 09 | 2f 2a 20 76 61 6c 75 65 |value;..|/* value|
|00001260| 20 66 6f 72 20 74 68 65 | 20 69 74 65 6d 2a 2f 0a | for the| item*/.|
|00001270| 58 7d 20 61 74 74 72 5f | 74 3b 0a 58 0a 58 4c 4f |X} attr_|t;.X.XLO|
|00001280| 43 41 4c 09 61 74 74 72 | 5f 74 09 09 61 74 74 72 |CAL.attr|_t..attr|
|00001290| 69 62 75 74 65 73 5b 5d | 20 3d 20 7b 0a 58 20 20 |ibutes[]| = {.X |
|000012a0| 7b 20 22 6e 6f 6e 65 22 | 2c 09 09 09 30 20 7d 2c |{ "none"|,...0 },|
|000012b0| 0a 58 20 20 0a 58 20 20 | 7b 20 22 6c 6f 67 2d 73 |.X .X |{ "log-s|
|000012c0| 74 61 74 73 22 2c 09 09 | 44 45 42 55 47 5f 4c 4f |tats",..|DEBUG_LO|
|000012d0| 47 5f 53 54 41 54 53 20 | 7d 2c 0a 58 20 20 7b 20 |G_STATS |},.X { |
|000012e0| 22 6c 6f 67 2d 6e 6f 6e | 2d 66 72 65 65 22 2c 09 |"log-non|-free",.|
|000012f0| 09 44 45 42 55 47 5f 4c | 4f 47 5f 4e 4f 4e 46 52 |.DEBUG_L|OG_NONFR|
|00001300| 45 45 20 7d 2c 0a 58 20 | 20 7b 20 22 6c 6f 67 2d |EE },.X | { "log-|
|00001310| 70 65 72 72 6f 72 22 2c | 09 09 44 45 42 55 47 5f |perror",|..DEBUG_|
|00001320| 4c 4f 47 5f 50 45 52 52 | 4f 52 20 7d 2c 0a 58 20 |LOG_PERR|OR },.X |
|00001330| 20 7b 20 22 6c 6f 67 2d | 74 72 61 6e 73 22 2c 09 | { "log-|trans",.|
|00001340| 09 44 45 42 55 47 5f 4c | 4f 47 5f 54 52 41 4e 53 |.DEBUG_L|OG_TRANS|
|00001350| 20 7d 2c 0a 58 20 20 7b | 20 22 6c 6f 67 2d 62 61 | },.X {| "log-ba|
|00001360| 64 2d 70 6e 74 22 2c 09 | 09 44 45 42 55 47 5f 4c |d-pnt",.|.DEBUG_L|
|00001370| 4f 47 5f 42 41 44 5f 50 | 4f 49 4e 54 45 52 20 7d |OG_BAD_P|OINTER }|
|00001380| 2c 0a 58 20 20 7b 20 22 | 6c 6f 67 2d 61 64 6d 69 |,.X { "|log-admi|
|00001390| 6e 22 2c 09 09 44 45 42 | 55 47 5f 4c 4f 47 5f 41 |n",..DEB|UG_LOG_A|
|000013a0| 44 4d 49 4e 20 7d 2c 0a | 58 20 20 7b 20 22 6c 6f |DMIN },.|X { "lo|
|000013b0| 67 2d 62 6c 6f 63 6b 73 | 22 2c 09 09 44 45 42 55 |g-blocks|",..DEBU|
|000013c0| 47 5f 4c 4f 47 5f 42 4c | 4f 43 4b 53 20 7d 2c 0a |G_LOG_BL|OCKS },.|
|000013d0| 58 20 20 7b 20 22 6c 6f | 67 2d 75 6e 6b 6e 6f 77 |X { "lo|g-unknow|
|000013e0| 6e 22 2c 09 09 44 45 42 | 55 47 5f 4c 4f 47 5f 55 |n",..DEB|UG_LOG_U|
|000013f0| 4e 4b 4e 4f 57 4e 20 7d | 2c 0a 58 20 20 0a 58 20 |NKNOWN }|,.X .X |
|00001400| 20 7b 20 22 63 68 65 63 | 6b 2d 66 65 6e 63 65 22 | { "chec|k-fence"|
|00001410| 2c 09 09 44 45 42 55 47 | 5f 43 48 45 43 4b 5f 46 |,..DEBUG|_CHECK_F|
|00001420| 45 4e 43 45 20 7d 2c 0a | 58 20 20 7b 20 22 63 68 |ENCE },.|X { "ch|
|00001430| 65 63 6b 2d 68 65 61 70 | 22 2c 09 09 44 45 42 55 |eck-heap|",..DEBU|
|00001440| 47 5f 43 48 45 43 4b 5f | 48 45 41 50 20 7d 2c 0a |G_CHECK_|HEAP },.|
|00001450| 58 20 20 7b 20 22 63 68 | 65 63 6b 2d 6c 69 73 74 |X { "ch|eck-list|
|00001460| 73 22 2c 09 09 44 45 42 | 55 47 5f 43 48 45 43 4b |s",..DEB|UG_CHECK|
|00001470| 5f 4c 49 53 54 53 20 7d | 2c 0a 58 20 20 7b 20 22 |_LISTS }|,.X { "|
|00001480| 63 68 65 63 6b 2d 64 62 | 6c 6f 63 6b 22 2c 09 09 |check-db|lock",..|
|00001490| 44 45 42 55 47 5f 43 48 | 45 43 4b 5f 44 42 4c 4f |DEBUG_CH|ECK_DBLO|
|000014a0| 43 4b 20 7d 2c 0a 58 20 | 20 7b 20 22 63 68 65 63 |CK },.X | { "chec|
|000014b0| 6b 2d 64 62 6c 6f 63 6b | 2d 66 65 6e 63 65 22 2c |k-dblock|-fence",|
|000014c0| 09 44 45 42 55 47 5f 43 | 48 45 43 4b 5f 44 42 5f |.DEBUG_C|HECK_DB_|
|000014d0| 46 45 4e 43 45 20 7d 2c | 0a 58 20 20 7b 20 22 63 |FENCE },|.X { "c|
|000014e0| 68 65 63 6b 2d 66 72 65 | 65 22 2c 09 09 44 45 42 |heck-fre|e",..DEB|
|000014f0| 55 47 5f 43 48 45 43 4b | 5f 46 52 45 45 20 7d 2c |UG_CHECK|_FREE },|
|00001500| 0a 58 20 20 7b 20 22 63 | 68 65 63 6b 2d 66 75 6e |.X { "c|heck-fun|
|00001510| 63 73 22 2c 09 09 44 45 | 42 55 47 5f 43 48 45 43 |cs",..DE|BUG_CHEC|
|00001520| 4b 5f 46 55 4e 43 53 20 | 7d 2c 0a 58 20 20 0a 58 |K_FUNCS |},.X .X|
|00001530| 20 20 7b 20 22 72 65 61 | 6c 6c 6f 63 2d 63 6f 70 | { "rea|lloc-cop|
|00001540| 79 22 2c 09 09 44 45 42 | 55 47 5f 52 45 41 4c 4c |y",..DEB|UG_REALL|
|00001550| 4f 43 5f 43 4f 50 59 20 | 7d 2c 0a 58 20 20 7b 20 |OC_COPY |},.X { |
|00001560| 22 66 72 65 65 2d 62 6c | 61 6e 6b 22 2c 09 09 44 |"free-bl|ank",..D|
|00001570| 45 42 55 47 5f 46 52 45 | 45 5f 42 4c 41 4e 4b 20 |EBUG_FRE|E_BLANK |
|00001580| 7d 2c 0a 58 20 20 7b 20 | 22 65 72 72 6f 72 2d 61 |},.X { |"error-a|
|00001590| 62 6f 72 74 22 2c 09 09 | 44 45 42 55 47 5f 45 52 |bort",..|DEBUG_ER|
|000015a0| 52 4f 52 5f 41 42 4f 52 | 54 20 7d 2c 0a 58 20 20 |ROR_ABOR|T },.X |
|000015b0| 7b 20 22 61 6c 6c 6f 63 | 2d 62 6c 61 6e 6b 22 2c |{ "alloc|-blank",|
|000015c0| 09 09 44 45 42 55 47 5f | 41 4c 4c 4f 43 5f 42 4c |..DEBUG_|ALLOC_BL|
|000015d0| 41 4e 4b 20 7d 2c 0a 58 | 20 20 7b 20 22 68 65 61 |ANK },.X| { "hea|
|000015e0| 70 2d 63 68 65 63 6b 2d | 6d 61 70 22 2c 09 09 44 |p-check-|map",..D|
|000015f0| 45 42 55 47 5f 48 45 41 | 50 5f 43 48 45 43 4b 5f |EBUG_HEA|P_CHECK_|
|00001600| 4d 41 50 20 7d 2c 0a 58 | 20 20 7b 20 22 70 72 69 |MAP },.X| { "pri|
|00001610| 6e 74 2d 70 65 72 72 6f | 72 22 2c 09 09 44 45 42 |nt-perro|r",..DEB|
|00001620| 55 47 5f 50 52 49 4e 54 | 5f 50 45 52 52 4f 52 20 |UG_PRINT|_PERROR |
|00001630| 7d 2c 0a 58 20 20 0a 58 | 20 20 7b 20 4e 55 4c 4c |},.X .X| { NULL|
|00001640| 20 7d 0a 58 7d 3b 0a 58 | 0a 58 23 65 6e 64 69 66 | }.X};.X|.X#endif|
|00001650| 20 2f 2a 20 21 20 5f 5f | 44 42 47 5f 54 4f 4b 45 | /* ! __|DBG_TOKE|
|00001660| 4e 53 5f 48 5f 5f 20 2a | 2f 0a 45 4e 44 5f 4f 46 |NS_H__ *|/.END_OF|
|00001670| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 32 32 |_FILE.if| test 22|
|00001680| 39 33 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |93 -ne `|wc -c <'|
|00001690| 64 62 67 5f 74 6f 6b 65 | 6e 73 2e 68 27 60 3b 20 |dbg_toke|ns.h'`; |
|000016a0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|000016b0| 61 72 3a 20 5c 22 27 64 | 62 67 5f 74 6f 6b 65 6e |ar: \"'d|bg_token|
|000016c0| 73 2e 68 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |s.h'\" u|npacked |
|000016d0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|000016e0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 64 62 |.fi.# en|d of 'db|
|000016f0| 67 5f 74 6f 6b 65 6e 73 | 2e 68 27 0a 66 69 0a 69 |g_tokens|.h'.fi.i|
|00001700| 66 20 74 65 73 74 20 2d | 66 20 27 64 62 67 5f 76 |f test -|f 'dbg_v|
|00001710| 61 6c 75 65 73 2e 68 27 | 20 2d 61 20 22 24 7b 31 |alues.h'| -a "${1|
|00001720| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00001730| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00001740| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00001750| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00001760| 22 27 64 62 67 5f 76 61 | 6c 75 65 73 2e 68 27 5c |"'dbg_va|lues.h'\|
|00001770| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00001780| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00001790| 64 62 67 5f 76 61 6c 75 | 65 73 2e 68 27 5c 22 20 |dbg_valu|es.h'\" |
|000017a0| 5c 28 32 38 34 38 20 63 | 68 61 72 61 63 74 65 72 |\(2848 c|haracter|
|000017b0| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|000017c0| 20 3e 27 64 62 67 5f 76 | 61 6c 75 65 73 2e 68 27 | >'dbg_v|alues.h'|
|000017d0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|000017e0| 0a 58 2f 2a 0a 58 20 2a | 20 64 65 62 75 67 20 76 |.X/*.X *| debug v|
|000017f0| 61 6c 75 65 73 20 66 6f | 72 20 4d 41 4c 4c 4f 43 |alues fo|r MALLOC|
|00001800| 5f 44 45 42 55 47 20 61 | 6e 64 20 5f 6d 61 6c 6c |_DEBUG a|nd _mall|
|00001810| 6f 63 5f 64 65 62 75 67 | 0a 58 20 2a 0a 58 20 2a |oc_debug|.X *.X *|
|00001820| 20 43 6f 70 79 72 69 67 | 68 74 20 31 39 39 32 20 | Copyrig|ht 1992 |
|00001830| 62 79 20 47 72 61 79 20 | 57 61 74 73 6f 6e 20 61 |by Gray |Watson a|
|00001840| 6e 64 20 74 68 65 20 41 | 6e 74 61 69 72 65 20 43 |nd the A|ntaire C|
|00001850| 6f 72 70 6f 72 61 74 69 | 6f 6e 0a 58 20 2a 0a 58 |orporati|on.X *.X|
|00001860| 20 2a 20 54 68 69 73 20 | 66 69 6c 65 20 69 73 20 | * This |file is |
|00001870| 70 61 72 74 20 6f 66 20 | 74 68 65 20 6d 61 6c 6c |part of |the mall|
|00001880| 6f 63 2d 64 65 62 75 67 | 20 70 61 63 6b 61 67 65 |oc-debug| package|
|00001890| 2e 0a 58 20 2a 0a 58 20 | 2a 20 54 68 69 73 20 6c |..X *.X |* This l|
|000018a0| 69 62 72 61 72 79 20 69 | 73 20 66 72 65 65 20 73 |ibrary i|s free s|
|000018b0| 6f 66 74 77 61 72 65 3b | 20 79 6f 75 20 63 61 6e |oftware;| you can|
|000018c0| 20 72 65 64 69 73 74 72 | 69 62 75 74 65 20 69 74 | redistr|ibute it|
|000018d0| 20 61 6e 64 2f 6f 72 0a | 58 20 2a 20 6d 6f 64 69 | and/or.|X * modi|
|000018e0| 66 79 20 69 74 20 75 6e | 64 65 72 20 74 68 65 20 |fy it un|der the |
|000018f0| 74 65 72 6d 73 20 6f 66 | 20 74 68 65 20 47 4e 55 |terms of| the GNU|
|00001900| 20 4c 69 62 72 61 72 79 | 20 47 65 6e 65 72 61 6c | Library| General|
|00001910| 20 50 75 62 6c 69 63 0a | 58 20 2a 20 4c 69 63 65 | Public.|X * Lice|
|00001920| 6e 73 65 20 61 73 20 70 | 75 62 6c 69 73 68 65 64 |nse as p|ublished|
|00001930| 20 62 79 20 74 68 65 20 | 46 72 65 65 20 53 6f 66 | by the |Free Sof|
|00001940| 74 77 61 72 65 20 46 6f | 75 6e 64 61 74 69 6f 6e |tware Fo|undation|
|00001950| 3b 20 65 69 74 68 65 72 | 0a 58 20 2a 20 76 65 72 |; either|.X * ver|
|00001960| 73 69 6f 6e 20 32 20 6f | 66 20 74 68 65 20 4c 69 |sion 2 o|f the Li|
|00001970| 63 65 6e 73 65 2c 20 6f | 72 20 28 61 74 20 79 6f |cense, o|r (at yo|
|00001980| 75 72 20 6f 70 74 69 6f | 6e 29 20 61 6e 79 20 6c |ur optio|n) any l|
|00001990| 61 74 65 72 20 76 65 72 | 73 69 6f 6e 2e 0a 58 20 |ater ver|sion..X |
|000019a0| 2a 0a 58 20 2a 20 54 68 | 69 73 20 6c 69 62 72 61 |*.X * Th|is libra|
|000019b0| 72 79 20 69 73 20 64 69 | 73 74 72 69 62 75 74 65 |ry is di|stribute|
|000019c0| 64 20 69 6e 20 74 68 65 | 20 68 6f 70 65 20 74 68 |d in the| hope th|
|000019d0| 61 74 20 69 74 20 77 69 | 6c 6c 20 62 65 20 75 73 |at it wi|ll be us|
|000019e0| 65 66 75 6c 2c 0a 58 20 | 2a 20 62 75 74 20 57 49 |eful,.X |* but WI|
|000019f0| 54 48 4f 55 54 20 41 4e | 59 20 57 41 52 52 41 4e |THOUT AN|Y WARRAN|
|00001a00| 54 59 3b 20 77 69 74 68 | 6f 75 74 20 65 76 65 6e |TY; with|out even|
|00001a10| 20 74 68 65 20 69 6d 70 | 6c 69 65 64 20 77 61 72 | the imp|lied war|
|00001a20| 72 61 6e 74 79 20 6f 66 | 0a 58 20 2a 20 4d 45 52 |ranty of|.X * MER|
|00001a30| 43 48 41 4e 54 41 42 49 | 4c 49 54 59 20 6f 72 20 |CHANTABI|LITY or |
|00001a40| 46 49 54 4e 45 53 53 20 | 46 4f 52 20 41 20 50 41 |FITNESS |FOR A PA|
|00001a50| 52 54 49 43 55 4c 41 52 | 20 50 55 52 50 4f 53 45 |RTICULAR| PURPOSE|
|00001a60| 2e 20 20 53 65 65 20 74 | 68 65 20 47 4e 55 0a 58 |. See t|he GNU.X|
|00001a70| 20 2a 20 4c 69 62 72 61 | 72 79 20 47 65 6e 65 72 | * Libra|ry Gener|
|00001a80| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|00001a90| 65 20 66 6f 72 20 6d 6f | 72 65 20 64 65 74 61 69 |e for mo|re detai|
|00001aa0| 6c 73 2e 0a 58 20 2a 0a | 58 20 2a 20 59 6f 75 20 |ls..X *.|X * You |
|00001ab0| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 72 65 63 65 |should h|ave rece|
|00001ac0| 69 76 65 64 20 61 20 63 | 6f 70 79 20 6f 66 20 74 |ived a c|opy of t|
|00001ad0| 68 65 20 47 4e 55 20 4c | 69 62 72 61 72 79 20 47 |he GNU L|ibrary G|
|00001ae0| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 0a 58 20 |eneral P|ublic.X |
|00001af0| 2a 20 4c 69 63 65 6e 73 | 65 20 61 6c 6f 6e 67 20 |* Licens|e along |
|00001b00| 77 69 74 68 20 74 68 69 | 73 20 6c 69 62 72 61 72 |with thi|s librar|
|00001b10| 79 20 28 73 65 65 20 43 | 4f 50 59 49 4e 47 2d 4c |y (see C|OPYING-L|
|00001b20| 49 42 29 3b 20 69 66 20 | 6e 6f 74 2c 20 77 72 69 |IB); if |not, wri|
|00001b30| 74 65 20 74 6f 20 74 68 | 65 0a 58 20 2a 20 46 72 |te to th|e.X * Fr|
|00001b40| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00001b50| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 2c 20 36 37 |dation, |Inc., 67|
|00001b60| 35 20 4d 61 73 73 20 41 | 76 65 2c 20 43 61 6d 62 |5 Mass A|ve, Camb|
|00001b70| 72 69 64 67 65 2c 20 4d | 41 20 30 32 31 33 39 2c |ridge, M|A 02139,|
|00001b80| 20 55 53 41 2e 0a 58 20 | 2a 0a 58 20 2a 20 54 68 | USA..X |*.X * Th|
|00001b90| 65 20 61 75 74 68 6f 72 | 20 6f 66 20 74 68 65 20 |e author| of the |
|00001ba0| 70 72 6f 67 72 61 6d 20 | 6d 61 79 20 62 65 20 63 |program |may be c|
|00001bb0| 6f 6e 74 61 63 74 65 64 | 20 61 74 20 67 72 61 79 |ontacted| at gray|
|00001bc0| 2e 77 61 74 73 6f 6e 40 | 61 6e 74 61 69 72 65 2e |.watson@|antaire.|
|00001bd0| 63 6f 6d 0a 58 20 2a 0a | 58 20 2a 20 24 49 64 3a |com.X *.|X * $Id:|
|00001be0| 20 64 62 67 5f 76 61 6c | 75 65 73 2e 68 2c 76 20 | dbg_val|ues.h,v |
|00001bf0| 31 2e 33 20 31 39 39 33 | 2f 30 34 2f 30 35 20 32 |1.3 1993|/04/05 2|
|00001c00| 32 3a 33 30 3a 30 35 20 | 67 72 61 79 20 45 78 70 |2:30:05 |gray Exp|
|00001c10| 20 24 0a 58 20 2a 2f 0a | 58 0a 58 23 69 66 6e 64 | $.X */.|X.X#ifnd|
|00001c20| 65 66 20 5f 5f 44 42 47 | 5f 56 41 4c 55 45 53 5f |ef __DBG|_VALUES_|
|00001c30| 48 5f 5f 0a 58 23 64 65 | 66 69 6e 65 20 5f 5f 44 |H__.X#de|fine __D|
|00001c40| 42 47 5f 56 41 4c 55 45 | 53 5f 48 5f 5f 0a 58 0a |BG_VALUE|S_H__.X.|
|00001c50| 58 2f 2a 0a 58 20 2a 20 | 73 70 65 63 69 61 6c 20 |X/*.X * |special |
|00001c60| 64 65 62 75 67 20 63 6f | 64 65 73 20 77 68 69 63 |debug co|des whic|
|00001c70| 68 20 64 65 74 61 69 6c | 20 77 68 61 74 20 64 65 |h detail| what de|
|00001c80| 62 75 67 20 66 65 61 74 | 75 72 65 73 20 61 72 65 |bug feat|ures are|
|00001c90| 20 65 6e 61 62 6c 65 64 | 0a 58 20 2a 2f 0a 58 0a | enabled|.X */.X.|
|00001ca0| 58 2f 2a 20 6c 6f 67 67 | 69 6e 67 20 2a 2f 0a 58 |X/* logg|ing */.X|
|00001cb0| 23 64 65 66 69 6e 65 20 | 44 45 42 55 47 5f 4c 4f |#define |DEBUG_LO|
|00001cc0| 47 5f 53 54 41 54 53 09 | 09 42 49 54 5f 46 4c 41 |G_STATS.|.BIT_FLA|
|00001cd0| 47 28 30 29 09 2f 2a 20 | 67 65 6e 65 72 61 6c 6c |G(0)./* |generall|
|00001ce0| 79 20 6c 6f 67 20 73 74 | 61 74 69 73 74 69 63 73 |y log st|atistics|
|00001cf0| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 44 45 42 | */.X#de|fine DEB|
|00001d00| 55 47 5f 4c 4f 47 5f 4e | 4f 4e 46 52 45 45 09 42 |UG_LOG_N|ONFREE.B|
|00001d10| 49 54 5f 46 4c 41 47 28 | 31 29 09 2f 2a 20 72 65 |IT_FLAG(|1)./* re|
|00001d20| 70 6f 72 74 20 6e 6f 6e | 2d 66 72 65 65 64 20 70 |port non|-freed p|
|00001d30| 6f 69 6e 74 65 72 73 20 | 2a 2f 0a 58 23 64 65 66 |ointers |*/.X#def|
|00001d40| 69 6e 65 20 44 45 42 55 | 47 5f 4c 4f 47 5f 50 45 |ine DEBU|G_LOG_PE|
|00001d50| 52 52 4f 52 09 42 49 54 | 5f 46 4c 41 47 28 32 29 |RROR.BIT|_FLAG(2)|
|00001d60| 09 2f 2a 20 6c 6f 67 20 | 70 65 72 72 6f 72 20 70 |./* log |perror p|
|00001d70| 72 6f 62 6c 65 6d 73 20 | 2a 2f 0a 58 23 64 65 66 |roblems |*/.X#def|
|00001d80| 69 6e 65 20 44 45 42 55 | 47 5f 4c 4f 47 5f 54 52 |ine DEBU|G_LOG_TR|
|00001d90| 41 4e 53 09 09 42 49 54 | 5f 46 4c 41 47 28 33 29 |ANS..BIT|_FLAG(3)|
|00001da0| 09 2f 2a 20 6c 6f 67 20 | 6d 65 6d 6f 72 79 20 74 |./* log |memory t|
|00001db0| 72 61 6e 73 61 63 74 69 | 6f 6e 73 20 2a 2f 0a 58 |ransacti|ons */.X|
|00001dc0| 23 64 65 66 69 6e 65 20 | 44 45 42 55 47 5f 4c 4f |#define |DEBUG_LO|
|00001dd0| 47 5f 42 41 44 5f 50 4f | 49 4e 54 45 52 09 42 49 |G_BAD_PO|INTER.BI|
|00001de0| 54 5f 46 4c 41 47 28 34 | 29 09 2f 2a 20 6c 6f 67 |T_FLAG(4|)./* log|
|00001df0| 20 70 6f 69 6e 74 65 72 | 20 69 6e 66 6f 20 6f 6e | pointer| info on|
|00001e00| 20 65 72 72 6f 72 20 2a | 2f 0a 58 23 64 65 66 69 | error *|/.X#defi|
|00001e10| 6e 65 20 44 45 42 55 47 | 5f 4c 4f 47 5f 41 44 4d |ne DEBUG|_LOG_ADM|
|00001e20| 49 4e 09 09 42 49 54 5f | 46 4c 41 47 28 35 29 09 |IN..BIT_|FLAG(5).|
|00001e30| 2f 2a 20 6c 6f 67 20 62 | 61 63 6b 67 72 6f 75 6e |/* log b|ackgroun|
|00001e40| 64 20 61 64 6d 69 6e 20 | 69 6e 66 6f 20 2a 2f 0a |d admin |info */.|
|00001e50| 58 23 64 65 66 69 6e 65 | 20 44 45 42 55 47 5f 4c |X#define| DEBUG_L|
|00001e60| 4f 47 5f 42 4c 4f 43 4b | 53 09 42 49 54 5f 46 4c |OG_BLOCK|S.BIT_FL|
|00001e70| 41 47 28 36 29 09 2f 2a | 20 6c 6f 67 20 62 6c 6f |AG(6)./*| log blo|
|00001e80| 63 6b 73 20 77 68 65 6e | 20 68 65 61 70 2d 6d 61 |cks when| heap-ma|
|00001e90| 70 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 44 45 |p */.X#d|efine DE|
|00001ea0| 42 55 47 5f 4c 4f 47 5f | 55 4e 4b 4e 4f 57 4e 09 |BUG_LOG_|UNKNOWN.|
|00001eb0| 42 49 54 5f 46 4c 41 47 | 28 37 29 09 2f 2a 20 72 |BIT_FLAG|(7)./* r|
|00001ec0| 65 70 6f 72 74 20 75 6e | 6b 6e 6f 77 6e 20 6e 6f |eport un|known no|
|00001ed0| 6e 2d 66 72 65 65 64 20 | 2a 2f 0a 58 0a 58 2f 2a |n-freed |*/.X.X/*|
|00001ee0| 20 63 68 65 63 6b 69 6e | 67 20 2a 2f 0a 58 23 64 | checkin|g */.X#d|
|00001ef0| 65 66 69 6e 65 20 44 45 | 42 55 47 5f 43 48 45 43 |efine DE|BUG_CHEC|
|00001f00| 4b 5f 46 45 4e 43 45 09 | 42 49 54 5f 46 4c 41 47 |K_FENCE.|BIT_FLAG|
|00001f10| 28 31 30 29 09 2f 2a 20 | 63 68 65 63 6b 20 66 65 |(10)./* |check fe|
|00001f20| 6e 63 65 2d 70 6f 73 74 | 20 65 72 72 6f 72 73 20 |nce-post| errors |
|00001f30| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 44 45 42 | */.X#de|fine DEB|
|00001f40| 55 47 5f 43 48 45 43 4b | 5f 48 45 41 50 09 42 49 |UG_CHECK|_HEAP.BI|
|00001f50| 54 5f 46 4c 41 47 28 31 | 31 29 09 2f 2a 20 65 78 |T_FLAG(1|1)./* ex|
|00001f60| 61 6d 69 6e 65 20 68 65 | 61 70 20 61 64 6d 20 73 |amine he|ap adm s|
|00001f70| 74 72 75 63 74 73 20 2a | 2f 0a 58 23 64 65 66 69 |tructs *|/.X#defi|
|00001f80| 6e 65 20 44 45 42 55 47 | 5f 43 48 45 43 4b 5f 4c |ne DEBUG|_CHECK_L|
|00001f90| 49 53 54 53 09 42 49 54 | 5f 46 4c 41 47 28 31 32 |ISTS.BIT|_FLAG(12|
|00001fa0| 29 09 2f 2a 20 63 68 65 | 63 6b 20 74 68 65 20 66 |)./* che|ck the f|
|00001fb0| 72 65 65 20 6c 69 73 74 | 73 20 2a 2f 0a 58 23 64 |ree list|s */.X#d|
|00001fc0| 65 66 69 6e 65 20 44 45 | 42 55 47 5f 43 48 45 43 |efine DE|BUG_CHEC|
|00001fd0| 4b 5f 44 42 4c 4f 43 4b | 09 42 49 54 5f 46 4c 41 |K_DBLOCK|.BIT_FLA|
|00001fe0| 47 28 31 33 29 09 2f 2a | 20 63 6c 6f 73 65 6c 79 |G(13)./*| closely|
|00001ff0| 20 65 78 61 6d 69 6e 65 | 20 64 62 6c 6f 63 6b 73 | examine| dblocks|
|00002000| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 44 45 42 | */.X#de|fine DEB|
|00002010| 55 47 5f 43 48 45 43 4b | 5f 44 42 5f 46 45 4e 43 |UG_CHECK|_DB_FENC|
|00002020| 45 09 42 49 54 5f 46 4c | 41 47 28 31 34 29 09 2f |E.BIT_FL|AG(14)./|
|00002030| 2a 20 63 68 65 63 6b 20 | 66 65 6e 63 65 73 20 66 |* check |fences f|
|00002040| 6f 72 20 64 62 6c 6f 63 | 6b 73 20 2a 2f 0a 58 23 |or dbloc|ks */.X#|
|00002050| 64 65 66 69 6e 65 20 44 | 45 42 55 47 5f 43 48 45 |define D|EBUG_CHE|
|00002060| 43 4b 5f 46 52 45 45 09 | 42 49 54 5f 46 4c 41 47 |CK_FREE.|BIT_FLAG|
|00002070| 28 31 35 29 09 2f 2a 20 | 63 68 65 63 6b 20 66 72 |(15)./* |check fr|
|00002080| 65 65 20 62 6c 6f 63 6b | 73 20 6f 66 20 30 27 73 |ee block|s of 0's|
|00002090| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 44 45 42 | */.X#de|fine DEB|
|000020a0| 55 47 5f 43 48 45 43 4b | 5f 46 55 4e 43 53 09 42 |UG_CHECK|_FUNCS.B|
|000020b0| 49 54 5f 46 4c 41 47 28 | 31 36 29 09 2f 2a 20 63 |IT_FLAG(|16)./* c|
|000020c0| 68 65 63 6b 20 66 75 6e | 63 74 69 6f 6e 73 20 2a |heck fun|ctions *|
|000020d0| 2f 0a 58 0a 58 2f 2a 20 | 6d 69 73 63 20 2a 2f 0a |/.X.X/* |misc */.|
|000020e0| 58 23 64 65 66 69 6e 65 | 20 44 45 42 55 47 5f 52 |X#define| DEBUG_R|
|000020f0| 45 41 4c 4c 4f 43 5f 43 | 4f 50 59 09 42 49 54 5f |EALLOC_C|OPY.BIT_|
|00002100| 46 4c 41 47 28 32 30 29 | 09 2f 2a 20 63 6f 70 79 |FLAG(20)|./* copy|
|00002110| 20 61 6c 6c 20 72 65 61 | 6c 6c 6f 63 61 74 69 6f | all rea|llocatio|
|00002120| 6e 73 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 44 |ns */.X#|define D|
|00002130| 45 42 55 47 5f 46 52 45 | 45 5f 42 4c 41 4e 4b 09 |EBUG_FRE|E_BLANK.|
|00002140| 42 49 54 5f 46 4c 41 47 | 28 32 31 29 09 2f 2a 20 |BIT_FLAG|(21)./* |
|00002150| 77 72 69 74 65 20 6f 76 | 65 72 20 66 72 65 65 27 |write ov|er free'|
|00002160| 64 20 6d 65 6d 6f 72 79 | 20 2a 2f 0a 58 23 64 65 |d memory| */.X#de|
|00002170| 66 69 6e 65 20 44 45 42 | 55 47 5f 45 52 52 4f 52 |fine DEB|UG_ERROR|
|00002180| 5f 41 42 4f 52 54 09 42 | 49 54 5f 46 4c 41 47 28 |_ABORT.B|IT_FLAG(|
|00002190| 32 32 29 09 2f 2a 20 61 | 62 6f 72 74 20 6f 6e 20 |22)./* a|bort on |
|000021a0| 65 72 72 6f 72 20 65 6c | 73 65 20 65 78 69 74 20 |error el|se exit |
|000021b0| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 44 45 42 55 |*/.X#def|ine DEBU|
|000021c0| 47 5f 41 4c 4c 4f 43 5f | 42 4c 41 4e 4b 09 42 49 |G_ALLOC_|BLANK.BI|
|000021d0| 54 5f 46 4c 41 47 28 32 | 33 29 09 2f 2a 20 77 72 |T_FLAG(2|3)./* wr|
|000021e0| 69 74 65 20 6f 76 65 72 | 20 74 6f 2d 62 65 2d 61 |ite over| to-be-a|
|000021f0| 6c 6c 6f 63 65 64 20 2a | 2f 0a 58 23 64 65 66 69 |lloced *|/.X#defi|
|00002200| 6e 65 20 44 45 42 55 47 | 5f 48 45 41 50 5f 43 48 |ne DEBUG|_HEAP_CH|
|00002210| 45 43 4b 5f 4d 41 50 09 | 42 49 54 5f 46 4c 41 47 |ECK_MAP.|BIT_FLAG|
|00002220| 28 32 34 29 09 2f 2a 20 | 68 65 61 70 2d 6d 61 70 |(24)./* |heap-map|
|00002230| 20 6f 6e 20 68 65 61 70 | 2d 63 68 65 63 6b 20 2a | on heap|-check *|
|00002240| 2f 0a 58 23 64 65 66 69 | 6e 65 20 44 45 42 55 47 |/.X#defi|ne DEBUG|
|00002250| 5f 50 52 49 4e 54 5f 50 | 45 52 52 4f 52 09 42 49 |_PRINT_P|ERROR.BI|
|00002260| 54 5f 46 4c 41 47 28 32 | 35 29 09 2f 2a 20 70 72 |T_FLAG(2|5)./* pr|
|00002270| 69 6e 74 20 65 72 72 6f | 72 73 20 74 6f 20 53 54 |int erro|rs to ST|
|00002280| 44 45 52 52 20 2a 2f 0a | 58 0a 58 2f 2a 0a 58 20 |DERR */.|X.X/*.X |
|00002290| 2a 20 73 70 65 63 69 61 | 6c 20 66 6c 61 67 73 20 |* specia|l flags |
|000022a0| 74 68 61 74 20 61 66 74 | 65 72 20 62 65 69 6e 67 |that aft|er being|
|000022b0| 20 73 65 74 20 6f 72 20 | 6e 6f 74 2f 73 65 74 20 | set or |not/set |
|000022c0| 61 6e 64 20 70 72 6f 63 | 65 73 73 20 73 74 61 72 |and proc|ess star|
|000022d0| 74 2d 75 70 2c 20 63 61 | 6e 6e 6f 74 0a 58 20 2a |t-up, ca|nnot.X *|
|000022e0| 20 62 65 20 72 65 73 65 | 74 2e 0a 58 20 2a 2f 0a | be rese|t..X */.|
|000022f0| 58 23 64 65 66 69 6e 65 | 20 44 45 42 55 47 5f 4e |X#define| DEBUG_N|
|00002300| 4f 54 5f 43 48 41 4e 47 | 45 41 42 4c 45 09 28 44 |OT_CHANG|EABLE.(D|
|00002310| 45 42 55 47 5f 43 48 45 | 43 4b 5f 46 52 45 45 29 |EBUG_CHE|CK_FREE)|
|00002320| 0a 58 0a 58 23 65 6e 64 | 69 66 20 2f 2a 20 21 20 |.X.X#end|if /* ! |
|00002330| 5f 5f 44 42 47 5f 56 41 | 4c 55 45 53 5f 48 5f 5f |__DBG_VA|LUES_H__|
|00002340| 20 2a 2f 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a | */.END_|OF_FILE.|
|00002350| 69 66 20 74 65 73 74 20 | 32 38 34 38 20 2d 6e 65 |if test |2848 -ne|
|00002360| 20 60 77 63 20 2d 63 20 | 3c 27 64 62 67 5f 76 61 | `wc -c |<'dbg_va|
|00002370| 6c 75 65 73 2e 68 27 60 | 3b 20 74 68 65 6e 0a 20 |lues.h'`|; then. |
|00002380| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00002390| 27 64 62 67 5f 76 61 6c | 75 65 73 2e 68 27 5c 22 |'dbg_val|ues.h'\"|
|000023a0| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|000023b0| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 23 20 |rong siz|e!.fi.# |
|000023c0| 65 6e 64 20 6f 66 20 27 | 64 62 67 5f 76 61 6c 75 |end of '|dbg_valu|
|000023d0| 65 73 2e 68 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |es.h'.fi|.if test|
|000023e0| 20 2d 66 20 27 68 65 61 | 70 2e 63 27 20 2d 61 20 | -f 'hea|p.c' -a |
|000023f0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00002400| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00002410| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00002420| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00002430| 6c 65 20 5c 22 27 68 65 | 61 70 2e 63 27 5c 22 0a |le \"'he|ap.c'\".|
|00002440| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00002450| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 68 65 |Extracti|ng \"'he|
|00002460| 61 70 2e 63 27 5c 22 20 | 5c 28 32 37 38 35 20 63 |ap.c'\" |\(2785 c|
|00002470| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00002480| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 68 65 61 70 2e |"s/^X//"| >'heap.|
|00002490| 63 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |c' <<'EN|D_OF_FIL|
|000024a0| 45 27 0a 58 2f 2a 0a 58 | 20 2a 20 73 79 73 74 65 |E'.X/*.X| * syste|
|000024b0| 6d 20 73 70 65 63 69 66 | 69 63 20 6d 65 6d 6f 72 |m specif|ic memor|
|000024c0| 79 20 72 6f 75 74 69 6e | 65 73 0a 58 20 2a 0a 58 |y routin|es.X *.X|
|000024d0| 20 2a 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 | * Copyr|ight 199|
|000024e0| 32 20 62 79 20 47 72 61 | 79 20 57 61 74 73 6f 6e |2 by Gra|y Watson|
|000024f0| 20 61 6e 64 20 74 68 65 | 20 41 6e 74 61 69 72 65 | and the| Antaire|
|00002500| 20 43 6f 72 70 6f 72 61 | 74 69 6f 6e 0a 58 20 2a | Corpora|tion.X *|
|00002510| 0a 58 20 2a 20 54 68 69 | 73 20 66 69 6c 65 20 69 |.X * Thi|s file i|
|00002520| 73 20 70 61 72 74 20 6f | 66 20 74 68 65 20 6d 61 |s part o|f the ma|
|00002530| 6c 6c 6f 63 2d 64 65 62 | 75 67 20 70 61 63 6b 61 |lloc-deb|ug packa|
|00002540| 67 65 2e 0a 58 20 2a 0a | 58 20 2a 20 54 68 69 73 |ge..X *.|X * This|
|00002550| 20 6c 69 62 72 61 72 79 | 20 69 73 20 66 72 65 65 | library| is free|
|00002560| 20 73 6f 66 74 77 61 72 | 65 3b 20 79 6f 75 20 63 | softwar|e; you c|
|00002570| 61 6e 20 72 65 64 69 73 | 74 72 69 62 75 74 65 20 |an redis|tribute |
|00002580| 69 74 20 61 6e 64 2f 6f | 72 0a 58 20 2a 20 6d 6f |it and/o|r.X * mo|
|00002590| 64 69 66 79 20 69 74 20 | 75 6e 64 65 72 20 74 68 |dify it |under th|
|000025a0| 65 20 74 65 72 6d 73 20 | 6f 66 20 74 68 65 20 47 |e terms |of the G|
|000025b0| 4e 55 20 4c 69 62 72 61 | 72 79 20 47 65 6e 65 72 |NU Libra|ry Gener|
|000025c0| 61 6c 20 50 75 62 6c 69 | 63 0a 58 20 2a 20 4c 69 |al Publi|c.X * Li|
|000025d0| 63 65 6e 73 65 20 61 73 | 20 70 75 62 6c 69 73 68 |cense as| publish|
|000025e0| 65 64 20 62 79 20 74 68 | 65 20 46 72 65 65 20 53 |ed by th|e Free S|
|000025f0| 6f 66 74 77 61 72 65 20 | 46 6f 75 6e 64 61 74 69 |oftware |Foundati|
|00002600| 6f 6e 3b 20 65 69 74 68 | 65 72 0a 58 20 2a 20 76 |on; eith|er.X * v|
|00002610| 65 72 73 69 6f 6e 20 32 | 20 6f 66 20 74 68 65 20 |ersion 2| of the |
|00002620| 4c 69 63 65 6e 73 65 2c | 20 6f 72 20 28 61 74 20 |License,| or (at |
|00002630| 79 6f 75 72 20 6f 70 74 | 69 6f 6e 29 20 61 6e 79 |your opt|ion) any|
|00002640| 20 6c 61 74 65 72 20 76 | 65 72 73 69 6f 6e 2e 0a | later v|ersion..|
|00002650| 58 20 2a 0a 58 20 2a 20 | 54 68 69 73 20 6c 69 62 |X *.X * |This lib|
|00002660| 72 61 72 79 20 69 73 20 | 64 69 73 74 72 69 62 75 |rary is |distribu|
|00002670| 74 65 64 20 69 6e 20 74 | 68 65 20 68 6f 70 65 20 |ted in t|he hope |
|00002680| 74 68 61 74 20 69 74 20 | 77 69 6c 6c 20 62 65 20 |that it |will be |
|00002690| 75 73 65 66 75 6c 2c 0a | 58 20 2a 20 62 75 74 20 |useful,.|X * but |
|000026a0| 57 49 54 48 4f 55 54 20 | 41 4e 59 20 57 41 52 52 |WITHOUT |ANY WARR|
|000026b0| 41 4e 54 59 3b 20 77 69 | 74 68 6f 75 74 20 65 76 |ANTY; wi|thout ev|
|000026c0| 65 6e 20 74 68 65 20 69 | 6d 70 6c 69 65 64 20 77 |en the i|mplied w|
|000026d0| 61 72 72 61 6e 74 79 20 | 6f 66 0a 58 20 2a 20 4d |arranty |of.X * M|
|000026e0| 45 52 43 48 41 4e 54 41 | 42 49 4c 49 54 59 20 6f |ERCHANTA|BILITY o|
|000026f0| 72 20 46 49 54 4e 45 53 | 53 20 46 4f 52 20 41 20 |r FITNES|S FOR A |
|00002700| 50 41 52 54 49 43 55 4c | 41 52 20 50 55 52 50 4f |PARTICUL|AR PURPO|
|00002710| 53 45 2e 20 20 53 65 65 | 20 74 68 65 20 47 4e 55 |SE. See| the GNU|
|00002720| 0a 58 20 2a 20 4c 69 62 | 72 61 72 79 20 47 65 6e |.X * Lib|rary Gen|
|00002730| 65 72 61 6c 20 50 75 62 | 6c 69 63 20 4c 69 63 65 |eral Pub|lic Lice|
|00002740| 6e 73 65 20 66 6f 72 20 | 6d 6f 72 65 20 64 65 74 |nse for |more det|
|00002750| 61 69 6c 73 2e 0a 58 20 | 2a 0a 58 20 2a 20 59 6f |ails..X |*.X * Yo|
|00002760| 75 20 73 68 6f 75 6c 64 | 20 68 61 76 65 20 72 65 |u should| have re|
|00002770| 63 65 69 76 65 64 20 61 | 20 63 6f 70 79 20 6f 66 |ceived a| copy of|
|00002780| 20 74 68 65 20 47 4e 55 | 20 4c 69 62 72 61 72 79 | the GNU| Library|
|00002790| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 0a | General| Public.|
|000027a0| 58 20 2a 20 4c 69 63 65 | 6e 73 65 20 61 6c 6f 6e |X * Lice|nse alon|
|000027b0| 67 20 77 69 74 68 20 74 | 68 69 73 20 6c 69 62 72 |g with t|his libr|
|000027c0| 61 72 79 20 28 73 65 65 | 20 43 4f 50 59 49 4e 47 |ary (see| COPYING|
|000027d0| 2d 4c 49 42 29 3b 20 69 | 66 20 6e 6f 74 2c 20 77 |-LIB); i|f not, w|
|000027e0| 72 69 74 65 20 74 6f 20 | 74 68 65 0a 58 20 2a 20 |rite to |the.X * |
|000027f0| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00002800| 75 6e 64 61 74 69 6f 6e | 2c 20 49 6e 63 2e 2c 20 |undation|, Inc., |
|00002810| 36 37 35 20 4d 61 73 73 | 20 41 76 65 2c 20 43 61 |675 Mass| Ave, Ca|
|00002820| 6d 62 72 69 64 67 65 2c | 20 4d 41 20 30 32 31 33 |mbridge,| MA 0213|
|00002830| 39 2c 20 55 53 41 2e 0a | 58 20 2a 0a 58 20 2a 20 |9, USA..|X *.X * |
|00002840| 54 68 65 20 61 75 74 68 | 6f 72 20 6f 66 20 74 68 |The auth|or of th|
|00002850| 65 20 70 72 6f 67 72 61 | 6d 20 6d 61 79 20 62 65 |e progra|m may be|
|00002860| 20 63 6f 6e 74 61 63 74 | 65 64 20 61 74 20 67 72 | contact|ed at gr|
|00002870| 61 79 2e 77 61 74 73 6f | 6e 40 61 6e 74 61 69 72 |ay.watso|n@antair|
|00002880| 65 2e 63 6f 6d 0a 58 20 | 2a 2f 0a 58 0a 58 2f 2a |e.com.X |*/.X.X/*|
|00002890| 0a 58 20 2a 20 54 68 65 | 73 65 20 61 72 65 20 74 |.X * The|se are t|
|000028a0| 68 65 20 73 79 73 74 65 | 6d 2f 6d 61 63 68 69 6e |he syste|m/machin|
|000028b0| 65 20 73 70 65 63 69 66 | 69 63 20 72 6f 75 74 69 |e specif|ic routi|
|000028c0| 6e 65 73 20 66 6f 72 20 | 61 6c 6c 6f 63 61 74 69 |nes for |allocati|
|000028d0| 6e 67 20 73 70 61 63 65 | 20 6f 6e 20 74 68 65 0a |ng space| on the.|
|000028e0| 58 20 2a 20 68 65 61 70 | 20 61 73 20 77 65 6c 6c |X * heap| as well|
|000028f0| 20 61 73 20 72 65 70 6f | 72 74 69 6e 67 20 74 68 | as repo|rting th|
|00002900| 65 20 63 75 72 72 65 6e | 74 20 70 6f 73 69 74 69 |e curren|t positi|
|00002910| 6f 6e 20 6f 66 20 74 68 | 65 20 68 65 61 70 2e 0a |on of th|e heap..|
|00002920| 58 20 2a 2f 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 |X */.X.X|#define |
|00002930| 4d 41 4c 4c 4f 43 5f 44 | 45 42 55 47 5f 44 49 53 |MALLOC_D|EBUG_DIS|
|00002940| 41 42 4c 45 0a 58 0a 58 | 23 69 6e 63 6c 75 64 65 |ABLE.X.X|#include|
|00002950| 20 22 6d 61 6c 6c 6f 63 | 2e 68 22 0a 58 23 69 6e | "malloc|.h".X#in|
|00002960| 63 6c 75 64 65 20 22 6d | 61 6c 6c 6f 63 5f 6c 6f |clude "m|alloc_lo|
|00002970| 63 2e 68 22 0a 58 0a 58 | 23 69 6e 63 6c 75 64 65 |c.h".X.X|#include|
|00002980| 20 22 63 68 75 6e 6b 2e | 68 22 0a 58 23 69 6e 63 | "chunk.|h".X#inc|
|00002990| 6c 75 64 65 20 22 63 6f | 6d 70 61 74 2e 68 22 0a |lude "co|mpat.h".|
|000029a0| 58 23 69 6e 63 6c 75 64 | 65 20 22 63 6f 6e 66 2e |X#includ|e "conf.|
|000029b0| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 65 72 |h".X#inc|lude "er|
|000029c0| 72 6f 72 2e 68 22 0a 58 | 23 69 6e 63 6c 75 64 65 |ror.h".X|#include|
|000029d0| 20 22 65 72 72 6f 72 5f | 76 61 6c 2e 68 22 0a 58 | "error_|val.h".X|
|000029e0| 23 69 6e 63 6c 75 64 65 | 20 22 68 65 61 70 2e 68 |#include| "heap.h|
|000029f0| 22 0a 58 0a 58 23 69 66 | 20 49 4e 43 4c 55 44 45 |".X.X#if| INCLUDE|
|00002a00| 5f 52 43 53 5f 49 44 53 | 0a 58 4c 4f 43 41 4c 09 |_RCS_IDS|.XLOCAL.|
|00002a10| 63 68 61 72 09 2a 72 63 | 73 5f 69 64 20 3d 0a 58 |char.*rc|s_id =.X|
|00002a20| 20 20 22 24 49 64 3a 20 | 68 65 61 70 2e 63 2c 76 | "$Id: |heap.c,v|
|00002a30| 20 31 2e 31 38 20 31 39 | 39 33 2f 30 34 2f 30 35 | 1.18 19|93/04/05|
|00002a40| 20 30 31 3a 32 39 3a 30 | 33 20 67 72 61 79 20 45 | 01:29:0|3 gray E|
|00002a50| 78 70 20 24 22 3b 0a 58 | 23 65 6e 64 69 66 0a 58 |xp $";.X|#endif.X|
|00002a60| 0a 58 2f 2a 20 65 78 74 | 65 72 6e 61 6c 20 72 6f |.X/* ext|ernal ro|
|00002a70| 75 74 69 6e 65 73 20 2a | 2f 0a 58 23 69 66 20 48 |utines *|/.X#if H|
|00002a80| 41 56 45 5f 53 42 52 4b | 0a 58 49 4d 50 4f 52 54 |AVE_SBRK|.XIMPORT|
|00002a90| 09 63 68 61 72 09 09 2a | 73 62 72 6b 28 69 6e 74 |.char..*|sbrk(int|
|00002aa0| 20 69 6e 63 72 29 3b 09 | 2f 2a 20 74 6f 20 65 78 | incr);.|/* to ex|
|00002ab0| 74 65 6e 64 20 74 68 65 | 20 68 65 61 70 20 2a 2f |tend the| heap */|
|00002ac0| 0a 58 23 64 65 66 69 6e | 65 20 53 42 52 4b 5f 45 |.X#defin|e SBRK_E|
|00002ad0| 52 52 4f 52 09 28 28 63 | 68 61 72 20 2a 29 2d 31 |RROR.((c|har *)-1|
|00002ae0| 29 09 09 2f 2a 20 73 62 | 72 6b 20 65 72 72 6f 72 |)../* sb|rk error|
|00002af0| 20 63 6f 64 65 20 2a 2f | 0a 58 23 65 6e 64 69 66 | code */|.X#endif|
|00002b00| 0a 58 0a 58 2f 2a 20 65 | 78 70 6f 72 74 65 64 20 |.X.X/* e|xported |
|00002b10| 76 61 72 69 61 62 6c 65 | 73 20 2a 2f 0a 58 45 58 |variable|s */.XEX|
|00002b20| 50 4f 52 54 09 63 68 61 | 72 09 09 2a 5f 68 65 61 |PORT.cha|r..*_hea|
|00002b30| 70 5f 62 61 73 65 20 3d | 20 4e 55 4c 4c 3b 09 2f |p_base =| NULL;./|
|00002b40| 2a 20 62 61 73 65 20 6f | 66 20 6f 75 72 20 68 65 |* base o|f our he|
|00002b50| 61 70 20 2a 2f 0a 58 45 | 58 50 4f 52 54 09 63 68 |ap */.XE|XPORT.ch|
|00002b60| 61 72 09 09 2a 5f 68 65 | 61 70 5f 6c 61 73 74 20 |ar..*_he|ap_last |
|00002b70| 3d 20 4e 55 4c 4c 3b 09 | 2f 2a 20 65 6e 64 20 6f |= NULL;.|/* end o|
|00002b80| 66 20 6f 75 72 20 68 65 | 61 70 20 2a 2f 0a 58 0a |f our he|ap */.X.|
|00002b90| 58 2f 2a 0a 58 20 2a 20 | 66 75 6e 63 74 69 6f 6e |X/*.X * |function|
|00002ba0| 20 74 6f 20 67 65 74 20 | 53 49 5a 45 20 6d 65 6d | to get |SIZE mem|
|00002bb0| 6f 72 79 20 62 79 74 65 | 73 20 66 72 6f 6d 20 74 |ory byte|s from t|
|00002bc0| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 68 65 |he end o|f the he|
|00002bd0| 61 70 0a 58 20 2a 2f 0a | 58 45 58 50 4f 52 54 09 |ap.X */.|XEXPORT.|
|00002be0| 63 68 61 72 09 2a 5f 68 | 65 61 70 5f 61 6c 6c 6f |char.*_h|eap_allo|
|00002bf0| 63 28 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 73 |c(unsign|ed int s|
|00002c00| 69 7a 65 29 0a 58 7b 0a | 58 20 20 63 68 61 72 09 |ize).X{.|X char.|
|00002c10| 09 2a 72 65 74 20 3d 20 | 48 45 41 50 5f 41 4c 4c |.*ret = |HEAP_ALL|
|00002c20| 4f 43 5f 45 52 52 4f 52 | 3b 0a 58 20 20 0a 58 23 |OC_ERROR|;.X .X#|
|00002c30| 69 66 20 48 41 56 45 5f | 53 42 52 4b 0a 58 20 20 |if HAVE_|SBRK.X |
|00002c40| 72 65 74 20 3d 20 73 62 | 72 6b 28 73 69 7a 65 29 |ret = sb|rk(size)|
|00002c50| 3b 0a 58 20 20 69 66 20 | 28 72 65 74 20 3d 3d 20 |;.X if |(ret == |
|00002c60| 53 42 52 4b 5f 45 52 52 | 4f 52 29 20 7b 0a 58 20 |SBRK_ERR|OR) {.X |
|00002c70| 20 20 20 6d 61 6c 6c 6f | 63 5f 65 72 72 6e 6f 20 | mallo|c_errno |
|00002c80| 3d 20 4d 41 4c 4c 4f 43 | 5f 41 4c 4c 4f 43 5f 46 |= MALLOC|_ALLOC_F|
|00002c90| 41 49 4c 45 44 3b 0a 58 | 20 20 20 20 5f 6d 61 6c |AILED;.X| _mal|
|00002ca0| 6c 6f 63 5f 70 65 72 72 | 6f 72 28 22 5f 68 65 61 |loc_perr|or("_hea|
|00002cb0| 70 5f 61 6c 6c 6f 63 22 | 29 3b 0a 58 20 20 20 20 |p_alloc"|);.X |
|00002cc0| 72 65 74 20 3d 20 48 45 | 41 50 5f 41 4c 4c 4f 43 |ret = HE|AP_ALLOC|
|00002cd0| 5f 45 52 52 4f 52 3b 0a | 58 20 20 7d 0a 58 20 20 |_ERROR;.|X }.X |
|00002ce0| 65 6c 73 65 20 7b 0a 58 | 20 20 20 20 2f 2a 20 69 |else {.X| /* i|
|00002cf0| 6e 63 72 65 6d 65 6e 74 | 20 6c 61 73 74 20 70 6f |ncrement| last po|
|00002d00| 69 6e 74 65 72 20 2a 2f | 0a 58 20 20 20 20 5f 68 |inter */|.X _h|
|00002d10| 65 61 70 5f 6c 61 73 74 | 20 2b 3d 20 73 69 7a 65 |eap_last| += size|
|00002d20| 3b 0a 58 20 20 7d 0a 58 | 23 65 6e 64 69 66 0a 58 |;.X }.X|#endif.X|
|00002d30| 20 20 0a 58 20 20 72 65 | 74 75 72 6e 20 72 65 74 | .X re|turn ret|
|00002d40| 3b 0a 58 7d 0a 58 0a 58 | 2f 2a 0a 58 20 2a 20 72 |;.X}.X.X|/*.X * r|
|00002d50| 65 74 75 72 6e 20 61 20 | 70 6f 69 6e 74 65 72 20 |eturn a |pointer |
|00002d60| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 65 |to the c|urrent e|
|00002d70| 6e 64 20 6f 66 20 74 68 | 65 20 68 65 61 70 0a 58 |nd of th|e heap.X|
|00002d80| 20 2a 2f 0a 58 45 58 50 | 4f 52 54 09 63 68 61 72 | */.XEXP|ORT.char|
|00002d90| 09 2a 5f 68 65 61 70 5f | 65 6e 64 28 76 6f 69 64 |.*_heap_|end(void|
|00002da0| 29 0a 58 7b 0a 58 20 20 | 63 68 61 72 09 09 2a 72 |).X{.X |char..*r|
|00002db0| 65 74 20 3d 20 48 45 41 | 50 5f 41 4c 4c 4f 43 5f |et = HEA|P_ALLOC_|
|00002dc0| 45 52 52 4f 52 3b 0a 58 | 20 20 0a 58 23 69 66 20 |ERROR;.X| .X#if |
|00002dd0| 48 41 56 45 5f 53 42 52 | 4b 0a 58 20 20 72 65 74 |HAVE_SBR|K.X ret|
|00002de0| 20 3d 20 73 62 72 6b 28 | 30 29 3b 0a 58 20 20 69 | = sbrk(|0);.X i|
|00002df0| 66 20 28 72 65 74 20 3d | 3d 20 53 42 52 4b 5f 45 |f (ret =|= SBRK_E|
|00002e00| 52 52 4f 52 29 20 7b 0a | 58 20 20 20 20 6d 61 6c |RROR) {.|X mal|
|00002e10| 6c 6f 63 5f 65 72 72 6e | 6f 20 3d 20 4d 41 4c 4c |loc_errn|o = MALL|
|00002e20| 4f 43 5f 41 4c 4c 4f 43 | 5f 46 41 49 4c 45 44 3b |OC_ALLOC|_FAILED;|
|00002e30| 0a 58 20 20 20 20 5f 6d | 61 6c 6c 6f 63 5f 70 65 |.X _m|alloc_pe|
|00002e40| 72 72 6f 72 28 22 5f 68 | 65 61 70 5f 65 6e 64 22 |rror("_h|eap_end"|
|00002e50| 29 3b 0a 58 20 20 20 20 | 72 65 74 20 3d 20 48 45 |);.X |ret = HE|
|00002e60| 41 50 5f 41 4c 4c 4f 43 | 5f 45 52 52 4f 52 3b 0a |AP_ALLOC|_ERROR;.|
|00002e70| 58 20 20 7d 0a 58 23 65 | 6e 64 69 66 0a 58 20 20 |X }.X#e|ndif.X |
|00002e80| 0a 58 20 20 72 65 74 75 | 72 6e 20 72 65 74 3b 0a |.X retu|rn ret;.|
|00002e90| 58 7d 0a 58 0a 58 2f 2a | 0a 58 20 2a 20 69 6e 69 |X}.X.X/*|.X * ini|
|00002ea0| 74 69 61 6c 69 7a 65 20 | 68 65 61 70 20 70 6f 69 |tialize |heap poi|
|00002eb0| 6e 74 65 72 73 0a 58 20 | 2a 2f 0a 58 45 58 50 4f |nters.X |*/.XEXPO|
|00002ec0| 52 54 09 76 6f 69 64 09 | 5f 68 65 61 70 5f 73 74 |RT.void.|_heap_st|
|00002ed0| 61 72 74 75 70 28 76 6f | 69 64 29 0a 58 7b 0a 58 |artup(vo|id).X{.X|
|00002ee0| 20 20 5f 68 65 61 70 5f | 62 61 73 65 20 3d 20 5f | _heap_|base = _|
|00002ef0| 68 65 61 70 5f 6c 61 73 | 74 20 3d 20 5f 68 65 61 |heap_las|t = _hea|
|00002f00| 70 5f 65 6e 64 28 29 3b | 0a 58 7d 0a 58 0a 58 2f |p_end();|.X}.X.X/|
|00002f10| 2a 0a 58 20 2a 20 61 6c | 69 67 6e 20 28 62 79 20 |*.X * al|ign (by |
|00002f20| 65 78 74 65 6e 64 69 6e | 67 29 20 5f 68 65 61 70 |extendin|g) _heap|
|00002f30| 5f 62 61 73 65 20 74 6f | 20 42 41 53 45 20 62 79 |_base to| BASE by|
|00002f40| 74 65 20 62 6f 75 6e 64 | 61 72 79 0a 58 20 2a 2f |te bound|ary.X */|
|00002f50| 0a 58 45 58 50 4f 52 54 | 09 63 68 61 72 09 2a 5f |.XEXPORT|.char.*_|
|00002f60| 68 65 61 70 5f 61 6c 69 | 67 6e 5f 62 61 73 65 28 |heap_ali|gn_base(|
|00002f70| 69 6e 74 20 62 61 73 65 | 29 0a 58 7b 0a 58 20 20 |int base|).X{.X |
|00002f80| 69 6e 74 09 64 69 66 66 | 3b 0a 58 20 20 0a 58 20 |int.diff|;.X .X |
|00002f90| 20 64 69 66 66 20 3d 20 | 28 6c 6f 6e 67 29 5f 68 | diff = |(long)_h|
|00002fa0| 65 61 70 5f 62 61 73 65 | 20 25 20 62 61 73 65 3b |eap_base| % base;|
|00002fb0| 0a 58 20 20 5f 68 65 61 | 70 5f 62 61 73 65 20 2b |.X _hea|p_base +|
|00002fc0| 3d 20 62 61 73 65 20 2d | 20 64 69 66 66 3b 0a 58 |= base -| diff;.X|
|00002fd0| 20 20 0a 58 20 20 72 65 | 74 75 72 6e 20 5f 68 65 | .X re|turn _he|
|00002fe0| 61 70 5f 61 6c 6c 6f 63 | 28 62 61 73 65 20 2d 20 |ap_alloc|(base - |
|00002ff0| 64 69 66 66 29 3b 0a 58 | 7d 0a 45 4e 44 5f 4f 46 |diff);.X|}.END_OF|
|00003000| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 32 37 |_FILE.if| test 27|
|00003010| 38 35 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |85 -ne `|wc -c <'|
|00003020| 68 65 61 70 2e 63 27 60 | 3b 20 74 68 65 6e 0a 20 |heap.c'`|; then. |
|00003030| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00003040| 27 68 65 61 70 2e 63 27 | 5c 22 20 75 6e 70 61 63 |'heap.c'|\" unpac|
|00003050| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00003060| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00003070| 20 27 68 65 61 70 2e 63 | 27 0a 66 69 0a 69 66 20 | 'heap.c|'.fi.if |
|00003080| 74 65 73 74 20 2d 66 20 | 27 68 65 61 70 2e 68 27 |test -f |'heap.h'|
|00003090| 20 2d 61 20 22 24 7b 31 | 7d 22 20 21 3d 20 22 2d | -a "${1|}" != "-|
|000030a0| 63 22 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c" ; the|n . ech|
|000030b0| 6f 20 73 68 61 72 3a 20 | 57 69 6c 6c 20 6e 6f 74 |o shar: |Will not|
|000030c0| 20 63 6c 6f 62 62 65 72 | 20 65 78 69 73 74 69 6e | clobber| existin|
|000030d0| 67 20 66 69 6c 65 20 5c | 22 27 68 65 61 70 2e 68 |g file \|"'heap.h|
|000030e0| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|000030f0| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00003100| 22 27 68 65 61 70 2e 68 | 27 5c 22 20 5c 28 32 35 |"'heap.h|'\" \(25|
|00003110| 32 34 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |24 chara|cters\).|
|00003120| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 68 |sed "s/^|X//" >'h|
|00003130| 65 61 70 2e 68 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |eap.h' <|<'END_OF|
|00003140| 5f 46 49 4c 45 27 0a 58 | 2f 2a 0a 58 20 2a 20 64 |_FILE'.X|/*.X * d|
|00003150| 65 66 69 6e 65 73 20 66 | 6f 72 20 74 68 65 20 73 |efines f|or the s|
|00003160| 79 73 74 65 6d 20 73 70 | 65 63 69 66 69 63 20 6d |ystem sp|ecific m|
|00003170| 65 6d 6f 72 79 20 72 6f | 75 74 69 6e 65 73 0a 58 |emory ro|utines.X|
|00003180| 20 2a 0a 58 20 2a 20 43 | 6f 70 79 72 69 67 68 74 | *.X * C|opyright|
|00003190| 20 31 39 39 32 20 62 79 | 20 47 72 61 79 20 57 61 | 1992 by| Gray Wa|
|000031a0| 74 73 6f 6e 20 61 6e 64 | 20 74 68 65 20 41 6e 74 |tson and| the Ant|
|000031b0| 61 69 72 65 20 43 6f 72 | 70 6f 72 61 74 69 6f 6e |aire Cor|poration|
|000031c0| 0a 58 20 2a 0a 58 20 2a | 20 54 68 69 73 20 66 69 |.X *.X *| This fi|
|000031d0| 6c 65 20 69 73 20 70 61 | 72 74 20 6f 66 20 74 68 |le is pa|rt of th|
|000031e0| 65 20 6d 61 6c 6c 6f 63 | 2d 64 65 62 75 67 20 70 |e malloc|-debug p|
|000031f0| 61 63 6b 61 67 65 2e 0a | 58 20 2a 0a 58 20 2a 20 |ackage..|X *.X * |
|00003200| 54 68 69 73 20 6c 69 62 | 72 61 72 79 20 69 73 20 |This lib|rary is |
|00003210| 66 72 65 65 20 73 6f 66 | 74 77 61 72 65 3b 20 79 |free sof|tware; y|
|00003220| 6f 75 20 63 61 6e 20 72 | 65 64 69 73 74 72 69 62 |ou can r|edistrib|
|00003230| 75 74 65 20 69 74 20 61 | 6e 64 2f 6f 72 0a 58 20 |ute it a|nd/or.X |
|00003240| 2a 20 6d 6f 64 69 66 79 | 20 69 74 20 75 6e 64 65 |* modify| it unde|
|00003250| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 20 74 |r the te|rms of t|
|00003260| 68 65 20 47 4e 55 20 4c | 69 62 72 61 72 79 20 47 |he GNU L|ibrary G|
|00003270| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 0a 58 20 |eneral P|ublic.X |
|00003280| 2a 20 4c 69 63 65 6e 73 | 65 20 61 73 20 70 75 62 |* Licens|e as pub|
|00003290| 6c 69 73 68 65 64 20 62 | 79 20 74 68 65 20 46 72 |lished b|y the Fr|
|000032a0| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|000032b0| 64 61 74 69 6f 6e 3b 20 | 65 69 74 68 65 72 0a 58 |dation; |either.X|
|000032c0| 20 2a 20 76 65 72 73 69 | 6f 6e 20 32 20 6f 66 20 | * versi|on 2 of |
|000032d0| 74 68 65 20 4c 69 63 65 | 6e 73 65 2c 20 6f 72 20 |the Lice|nse, or |
|000032e0| 28 61 74 20 79 6f 75 72 | 20 6f 70 74 69 6f 6e 29 |(at your| option)|
|000032f0| 20 61 6e 79 20 6c 61 74 | 65 72 20 76 65 72 73 69 | any lat|er versi|
|00003300| 6f 6e 2e 0a 58 20 2a 0a | 58 20 2a 20 54 68 69 73 |on..X *.|X * This|
|00003310| 20 6c 69 62 72 61 72 79 | 20 69 73 20 64 69 73 74 | library| is dist|
|00003320| 72 69 62 75 74 65 64 20 | 69 6e 20 74 68 65 20 68 |ributed |in the h|
|00003330| 6f 70 65 20 74 68 61 74 | 20 69 74 20 77 69 6c 6c |ope that| it will|
|00003340| 20 62 65 20 75 73 65 66 | 75 6c 2c 0a 58 20 2a 20 | be usef|ul,.X * |
|00003350| 62 75 74 20 57 49 54 48 | 4f 55 54 20 41 4e 59 20 |but WITH|OUT ANY |
|00003360| 57 41 52 52 41 4e 54 59 | 3b 20 77 69 74 68 6f 75 |WARRANTY|; withou|
|00003370| 74 20 65 76 65 6e 20 74 | 68 65 20 69 6d 70 6c 69 |t even t|he impli|
|00003380| 65 64 20 77 61 72 72 61 | 6e 74 79 20 6f 66 0a 58 |ed warra|nty of.X|
|00003390| 20 2a 20 4d 45 52 43 48 | 41 4e 54 41 42 49 4c 49 | * MERCH|ANTABILI|
|000033a0| 54 59 20 6f 72 20 46 49 | 54 4e 45 53 53 20 46 4f |TY or FI|TNESS FO|
|000033b0| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 20 50 |R A PART|ICULAR P|
|000033c0| 55 52 50 4f 53 45 2e 20 | 20 53 65 65 20 74 68 65 |URPOSE. | See the|
|000033d0| 20 47 4e 55 0a 58 20 2a | 20 4c 69 62 72 61 72 79 | GNU.X *| Library|
|000033e0| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|000033f0| 4c 69 63 65 6e 73 65 20 | 66 6f 72 20 6d 6f 72 65 |License |for more|
|00003400| 20 64 65 74 61 69 6c 73 | 2e 0a 58 20 2a 0a 58 20 | details|..X *.X |
|00003410| 2a 20 59 6f 75 20 73 68 | 6f 75 6c 64 20 68 61 76 |* You sh|ould hav|
|00003420| 65 20 72 65 63 65 69 76 | 65 64 20 61 20 63 6f 70 |e receiv|ed a cop|
|00003430| 79 20 6f 66 20 74 68 65 | 20 47 4e 55 20 4c 69 62 |y of the| GNU Lib|
|00003440| 72 61 72 79 20 47 65 6e | 65 72 61 6c 20 50 75 62 |rary Gen|eral Pub|
|00003450| 6c 69 63 0a 58 20 2a 20 | 4c 69 63 65 6e 73 65 20 |lic.X * |License |
|00003460| 61 6c 6f 6e 67 20 77 69 | 74 68 20 74 68 69 73 20 |along wi|th this |
|00003470| 6c 69 62 72 61 72 79 20 | 28 73 65 65 20 43 4f 50 |library |(see COP|
|00003480| 59 49 4e 47 2d 4c 49 42 | 29 3b 20 69 66 20 6e 6f |YING-LIB|); if no|
|00003490| 74 2c 20 77 72 69 74 65 | 20 74 6f 20 74 68 65 0a |t, write| to the.|
|000034a0| 58 20 2a 20 46 72 65 65 | 20 53 6f 66 74 77 61 72 |X * Free| Softwar|
|000034b0| 65 20 46 6f 75 6e 64 61 | 74 69 6f 6e 2c 20 49 6e |e Founda|tion, In|
|000034c0| 63 2e 2c 20 36 37 35 20 | 4d 61 73 73 20 41 76 65 |c., 675 |Mass Ave|
|000034d0| 2c 20 43 61 6d 62 72 69 | 64 67 65 2c 20 4d 41 20 |, Cambri|dge, MA |
|000034e0| 30 32 31 33 39 2c 20 55 | 53 41 2e 0a 58 20 2a 0a |02139, U|SA..X *.|
|000034f0| 58 20 2a 20 54 68 65 20 | 61 75 74 68 6f 72 20 6f |X * The |author o|
|00003500| 66 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 6d 61 |f the pr|ogram ma|
|00003510| 79 20 62 65 20 63 6f 6e | 74 61 63 74 65 64 20 61 |y be con|tacted a|
|00003520| 74 20 67 72 61 79 2e 77 | 61 74 73 6f 6e 40 61 6e |t gray.w|atson@an|
|00003530| 74 61 69 72 65 2e 63 6f | 6d 0a 58 20 2a 0a 58 20 |taire.co|m.X *.X |
|00003540| 2a 20 24 49 64 3a 20 68 | 65 61 70 2e 68 2c 76 20 |* $Id: h|eap.h,v |
|00003550| 31 2e 39 20 31 39 39 33 | 2f 30 33 2f 32 36 20 30 |1.9 1993|/03/26 0|
|00003560| 39 3a 31 36 3a 34 31 20 | 67 72 61 79 20 45 78 70 |9:16:41 |gray Exp|
|00003570| 20 24 0a 58 20 2a 2f 0a | 58 0a 58 23 69 66 6e 64 | $.X */.|X.X#ifnd|
|00003580| 65 66 20 5f 5f 48 45 41 | 50 5f 48 5f 5f 0a 58 23 |ef __HEA|P_H__.X#|
|00003590| 64 65 66 69 6e 65 20 5f | 5f 48 45 41 50 5f 48 5f |define _|_HEAP_H_|
|000035a0| 5f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 22 6d |_.X.X#in|clude "m|
|000035b0| 61 6c 6c 6f 63 2e 68 22 | 09 09 09 2f 2a 20 66 6f |alloc.h"|.../* fo|
|000035c0| 72 20 4c 4f 43 41 4c 20 | 61 6e 64 20 62 6f 6f 6c |r LOCAL |and bool|
|000035d0| 20 73 74 75 66 66 20 2a | 2f 0a 58 0a 58 2f 2a 0a | stuff *|/.X.X/*.|
|000035e0| 58 20 2a 20 65 72 72 6f | 72 20 63 6f 64 65 20 72 |X * erro|r code r|
|000035f0| 65 74 75 72 6e 65 64 20 | 62 79 20 68 65 61 70 20 |eturned |by heap |
|00003600| 61 6c 6c 6f 63 61 74 69 | 6f 6e 20 72 6f 75 74 69 |allocati|on routi|
|00003610| 6e 65 0a 58 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |ne.X */.|X#define|
|00003620| 20 48 45 41 50 5f 41 4c | 4c 4f 43 5f 45 52 52 4f | HEAP_AL|LOC_ERRO|
|00003630| 52 09 28 28 63 68 61 72 | 20 2a 29 2d 31 29 0a 58 |R.((char| *)-1).X|
|00003640| 0a 58 2f 2a 0a 58 20 2a | 20 70 72 6f 62 61 62 6c |.X/*.X *| probabl|
|00003650| 79 20 6d 61 63 68 69 6e | 65 20 73 70 65 63 69 66 |y machin|e specif|
|00003660| 69 63 20 64 65 66 69 6e | 65 73 20 75 73 65 64 20 |ic defin|es used |
|00003670| 66 6f 72 20 63 65 72 74 | 61 69 6e 20 63 61 6c 63 |for cert|ain calc|
|00003680| 75 6c 61 74 69 6f 6e 73 | 0a 58 20 2a 2f 0a 58 23 |ulations|.X */.X#|
|00003690| 69 66 20 48 45 41 50 5f | 47 52 4f 57 53 5f 55 50 |if HEAP_|GROWS_UP|
|000036a0| 0a 58 0a 58 2f 2a 20 74 | 65 73 74 20 77 68 65 74 |.X.X/* t|est whet|
|000036b0| 68 65 72 20 70 6f 69 6e | 74 65 72 20 50 20 69 73 |her poin|ter P is|
|000036c0| 20 69 6e 20 74 68 65 20 | 68 65 61 70 20 73 70 61 | in the |heap spa|
|000036d0| 63 65 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 49 |ce */.X#|define I|
|000036e0| 53 5f 49 4e 5f 48 45 41 | 50 28 70 29 09 09 5c 0a |S_IN_HEA|P(p)..\.|
|000036f0| 58 20 20 28 28 63 68 61 | 72 20 2a 29 28 70 29 20 |X ((cha|r *)(p) |
|00003700| 3e 3d 20 5f 68 65 61 70 | 5f 62 61 73 65 20 26 26 |>= _heap|_base &&|
|00003710| 20 28 63 68 61 72 20 2a | 29 28 70 29 20 3c 20 5f | (char *|)(p) < _|
|00003720| 68 65 61 70 5f 6c 61 73 | 74 29 0a 58 0a 58 2f 2a |heap_las|t).X.X/*|
|00003730| 20 74 75 72 6e 20 70 6f | 69 6e 74 65 72 20 50 20 | turn po|inter P |
|00003740| 69 6e 74 6f 20 61 20 62 | 6c 6f 63 6b 20 69 6e 64 |into a b|lock ind|
|00003750| 65 78 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 57 |ex */.X#|define W|
|00003760| 48 49 43 48 5f 42 4c 4f | 43 4b 28 70 29 09 09 28 |HICH_BLO|CK(p)..(|
|00003770| 28 28 70 29 20 2d 20 5f | 68 65 61 70 5f 62 61 73 |((p) - _|heap_bas|
|00003780| 65 29 20 2f 20 42 4c 4f | 43 4b 5f 53 49 5a 45 29 |e) / BLO|CK_SIZE)|
|00003790| 0a 58 0a 58 2f 2a 20 67 | 65 74 20 61 20 70 6f 69 |.X.X/* g|et a poi|
|000037a0| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 6d 65 6d 6f |nter to |the memo|
|000037b0| 72 79 20 62 6c 6f 63 6b | 20 6e 75 6d 62 65 72 20 |ry block| number |
|000037c0| 43 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 42 4c |C */.X#d|efine BL|
|000037d0| 4f 43 4b 5f 50 4f 49 4e | 54 45 52 28 63 29 09 28 |OCK_POIN|TER(c).(|
|000037e0| 5f 68 65 61 70 5f 62 61 | 73 65 20 2b 20 28 63 29 |_heap_ba|se + (c)|
|000037f0| 20 2a 20 42 4c 4f 43 4b | 5f 53 49 5a 45 29 0a 58 | * BLOCK|_SIZE).X|
|00003800| 0a 58 2f 2a 20 74 65 73 | 74 20 77 68 65 74 68 65 |.X/* tes|t whethe|
|00003810| 72 20 70 6f 69 6e 74 65 | 72 20 50 20 69 73 20 6f |r pointe|r P is o|
|00003820| 6e 20 61 20 62 6c 6f 63 | 6b 20 62 6f 75 6e 64 61 |n a bloc|k bounda|
|00003830| 72 79 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 4f |ry */.X#|define O|
|00003840| 4e 5f 42 4c 4f 43 4b 28 | 70 29 09 09 28 28 28 70 |N_BLOCK(|p)..(((p|
|00003850| 29 20 2d 20 5f 68 65 61 | 70 5f 62 61 73 65 29 20 |) - _hea|p_base) |
|00003860| 25 20 42 4c 4f 43 4b 5f | 53 49 5a 45 20 3d 3d 20 |% BLOCK_|SIZE == |
|00003870| 30 29 0a 58 0a 58 2f 2a | 20 63 61 6c 63 75 6c 61 |0).X.X/*| calcula|
|00003880| 74 65 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 68 |te the s|ize of h|
|00003890| 65 61 70 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |eap */.X|#define |
|000038a0| 48 45 41 50 5f 53 49 5a | 45 09 09 28 5f 68 65 61 |HEAP_SIZ|E..(_hea|
|000038b0| 70 5f 6c 61 73 74 20 2d | 20 5f 68 65 61 70 5f 62 |p_last -| _heap_b|
|000038c0| 61 73 65 29 0a 58 0a 58 | 23 65 6e 64 69 66 0a 58 |ase).X.X|#endif.X|
|000038d0| 0a 58 2f 2a 3c 3c 3c 3c | 3c 3c 3c 3c 3c 3c 20 20 |.X/*<<<<|<<<<<< |
|000038e0| 54 68 65 20 62 65 6c 6f | 77 20 70 72 6f 74 6f 74 |The belo|w protot|
|000038f0| 79 70 65 73 20 61 72 65 | 20 61 75 74 6f 2d 67 65 |ypes are| auto-ge|
|00003900| 6e 65 72 61 74 65 64 20 | 62 79 20 66 69 6c 6c 70 |nerated |by fillp|
|00003910| 72 6f 74 6f 20 2a 2f 0a | 58 0a 58 49 4d 50 4f 52 |roto */.|X.XIMPOR|
|00003920| 54 09 63 68 61 72 09 09 | 2a 5f 68 65 61 70 5f 62 |T.char..|*_heap_b|
|00003930| 61 73 65 3b 20 20 2f 2a | 20 62 61 73 65 20 6f 66 |ase; /*| base of|
|00003940| 20 6f 75 72 20 68 65 61 | 70 20 2a 2f 0a 58 0a 58 | our hea|p */.X.X|
|00003950| 49 4d 50 4f 52 54 09 63 | 68 61 72 09 09 2a 5f 68 |IMPORT.c|har..*_h|
|00003960| 65 61 70 5f 6c 61 73 74 | 3b 20 20 2f 2a 20 65 6e |eap_last|; /* en|
|00003970| 64 20 6f 66 20 6f 75 72 | 20 68 65 61 70 20 2a 2f |d of our| heap */|
|00003980| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 66 75 6e 63 74 |.X.X/*.X| * funct|
|00003990| 69 6f 6e 20 74 6f 20 67 | 65 74 20 53 49 5a 45 20 |ion to g|et SIZE |
|000039a0| 6d 65 6d 6f 72 79 20 62 | 79 74 65 73 20 66 72 6f |memory b|ytes fro|
|000039b0| 6d 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |m the en|d of the|
|000039c0| 20 68 65 61 70 0a 58 20 | 2a 2f 0a 58 49 4d 50 4f | heap.X |*/.XIMPO|
|000039d0| 52 54 09 63 68 61 72 09 | 2a 5f 68 65 61 70 5f 61 |RT.char.|*_heap_a|
|000039e0| 6c 6c 6f 63 28 75 6e 73 | 69 67 6e 65 64 20 69 6e |lloc(uns|igned in|
|000039f0| 74 20 73 69 7a 65 29 3b | 0a 58 0a 58 2f 2a 0a 58 |t size);|.X.X/*.X|
|00003a00| 20 2a 20 72 65 74 75 72 | 6e 20 61 20 70 6f 69 6e | * retur|n a poin|
|00003a10| 74 65 72 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |ter to t|he curre|
|00003a20| 6e 74 20 65 6e 64 20 6f | 66 20 74 68 65 20 68 65 |nt end o|f the he|
|00003a30| 61 70 0a 58 20 2a 2f 0a | 58 49 4d 50 4f 52 54 09 |ap.X */.|XIMPORT.|
|00003a40| 63 68 61 72 09 2a 5f 68 | 65 61 70 5f 65 6e 64 28 |char.*_h|eap_end(|
|00003a50| 76 6f 69 64 29 3b 0a 58 | 0a 58 2f 2a 0a 58 20 2a |void);.X|.X/*.X *|
|00003a60| 20 69 6e 69 74 69 61 6c | 69 7a 65 20 68 65 61 70 | initial|ize heap|
|00003a70| 20 70 6f 69 6e 74 65 72 | 73 0a 58 20 2a 2f 0a 58 | pointer|s.X */.X|
|00003a80| 49 4d 50 4f 52 54 09 76 | 6f 69 64 09 5f 68 65 61 |IMPORT.v|oid._hea|
|00003a90| 70 5f 73 74 61 72 74 75 | 70 28 76 6f 69 64 29 3b |p_startu|p(void);|
|00003aa0| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 61 6c 69 67 6e |.X.X/*.X| * align|
|00003ab0| 20 28 62 79 20 65 78 74 | 65 6e 64 69 6e 67 29 20 | (by ext|ending) |
|00003ac0| 5f 68 65 61 70 5f 62 61 | 73 65 20 74 6f 20 42 41 |_heap_ba|se to BA|
|00003ad0| 53 45 20 62 79 74 65 20 | 62 6f 75 6e 64 61 72 79 |SE byte |boundary|
|00003ae0| 0a 58 20 2a 2f 0a 58 49 | 4d 50 4f 52 54 09 63 68 |.X */.XI|MPORT.ch|
|00003af0| 61 72 09 2a 5f 68 65 61 | 70 5f 61 6c 69 67 6e 5f |ar.*_hea|p_align_|
|00003b00| 62 61 73 65 28 69 6e 74 | 20 62 61 73 65 29 3b 0a |base(int| base);.|
|00003b10| 58 0a 58 2f 2a 3c 3c 3c | 3c 3c 3c 3c 3c 3c 3c 20 |X.X/*<<<|<<<<<<< |
|00003b20| 20 20 54 68 69 73 20 69 | 73 20 65 6e 64 20 6f 66 | This i|s end of|
|00003b30| 20 74 68 65 20 61 75 74 | 6f 2d 67 65 6e 65 72 61 | the aut|o-genera|
|00003b40| 74 65 64 20 6f 75 74 70 | 75 74 20 66 72 6f 6d 20 |ted outp|ut from |
|00003b50| 66 69 6c 6c 70 72 6f 74 | 6f 2e 20 2a 2f 0a 58 0a |fillprot|o. */.X.|
|00003b60| 58 23 65 6e 64 69 66 20 | 2f 2a 20 21 20 5f 5f 48 |X#endif |/* ! __H|
|00003b70| 45 41 50 5f 48 5f 5f 20 | 2a 2f 0a 45 4e 44 5f 4f |EAP_H__ |*/.END_O|
|00003b80| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 32 |F_FILE.i|f test 2|
|00003b90| 35 32 34 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |524 -ne |`wc -c <|
|00003ba0| 27 68 65 61 70 2e 68 27 | 60 3b 20 74 68 65 6e 0a |'heap.h'|`; then.|
|00003bb0| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00003bc0| 22 27 68 65 61 70 2e 68 | 27 5c 22 20 75 6e 70 61 |"'heap.h|'\" unpa|
|00003bd0| 63 6b 65 64 20 77 69 74 | 68 20 77 72 6f 6e 67 20 |cked wit|h wrong |
|00003be0| 73 69 7a 65 21 0a 66 69 | 0a 23 20 65 6e 64 20 6f |size!.fi|.# end o|
|00003bf0| 66 20 27 68 65 61 70 2e | 68 27 0a 66 69 0a 69 66 |f 'heap.|h'.fi.if|
|00003c00| 20 74 65 73 74 20 2d 66 | 20 27 6d 61 6c 6c 6f 63 | test -f| 'malloc|
|00003c10| 2e 68 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.h' -a "|${1}" !=|
|00003c20| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00003c30| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00003c40| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00003c50| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 6d 61 6c |ting fil|e \"'mal|
|00003c60| 6c 6f 63 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |loc.h'\"|.else.ec|
|00003c70| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00003c80| 69 6e 67 20 5c 22 27 6d | 61 6c 6c 6f 63 2e 68 27 |ing \"'m|alloc.h'|
|00003c90| 5c 22 20 5c 28 39 30 34 | 36 20 63 68 61 72 61 63 |\" \(904|6 charac|
|00003ca0| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00003cb0| 2f 2f 22 20 3e 27 6d 61 | 6c 6c 6f 63 2e 68 27 20 |//" >'ma|lloc.h' |
|00003cc0| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00003cd0| 58 2f 2a 0a 58 20 2a 20 | 64 65 66 69 6e 65 73 20 |X/*.X * |defines |
|00003ce0| 66 6f 72 20 74 68 65 20 | 6d 61 6c 6c 6f 63 2d 64 |for the |malloc-d|
|00003cf0| 65 62 75 67 20 6c 69 62 | 72 61 72 79 0a 58 20 2a |ebug lib|rary.X *|
|00003d00| 0a 58 20 2a 20 43 6f 70 | 79 72 69 67 68 74 20 31 |.X * Cop|yright 1|
|00003d10| 39 39 32 20 62 79 20 47 | 72 61 79 20 57 61 74 73 |992 by G|ray Wats|
|00003d20| 6f 6e 20 61 6e 64 20 74 | 68 65 20 41 6e 74 61 69 |on and t|he Antai|
|00003d30| 72 65 20 43 6f 72 70 6f | 72 61 74 69 6f 6e 0a 58 |re Corpo|ration.X|
|00003d40| 20 2a 0a 58 20 2a 20 54 | 68 69 73 20 66 69 6c 65 | *.X * T|his file|
|00003d50| 20 69 73 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 | is part| of the |
|00003d60| 6d 61 6c 6c 6f 63 2d 64 | 65 62 75 67 20 70 61 63 |malloc-d|ebug pac|
|00003d70| 6b 61 67 65 2e 0a 58 20 | 2a 0a 58 20 2a 20 54 68 |kage..X |*.X * Th|
|00003d80| 69 73 20 6c 69 62 72 61 | 72 79 20 69 73 20 66 72 |is libra|ry is fr|
|00003d90| 65 65 20 73 6f 66 74 77 | 61 72 65 3b 20 79 6f 75 |ee softw|are; you|
|00003da0| 20 63 61 6e 20 72 65 64 | 69 73 74 72 69 62 75 74 | can red|istribut|
|00003db0| 65 20 69 74 20 61 6e 64 | 2f 6f 72 0a 58 20 2a 20 |e it and|/or.X * |
|00003dc0| 6d 6f 64 69 66 79 20 69 | 74 20 75 6e 64 65 72 20 |modify i|t under |
|00003dd0| 74 68 65 20 74 65 72 6d | 73 20 6f 66 20 74 68 65 |the term|s of the|
|00003de0| 20 47 4e 55 20 4c 69 62 | 72 61 72 79 20 47 65 6e | GNU Lib|rary Gen|
|00003df0| 65 72 61 6c 20 50 75 62 | 6c 69 63 0a 58 20 2a 20 |eral Pub|lic.X * |
|00003e00| 4c 69 63 65 6e 73 65 20 | 61 73 20 70 75 62 6c 69 |License |as publi|
|00003e10| 73 68 65 64 20 62 79 20 | 74 68 65 20 46 72 65 65 |shed by |the Free|
|00003e20| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|00003e30| 74 69 6f 6e 3b 20 65 69 | 74 68 65 72 0a 58 20 2a |tion; ei|ther.X *|
|00003e40| 20 76 65 72 73 69 6f 6e | 20 32 20 6f 66 20 74 68 | version| 2 of th|
|00003e50| 65 20 4c 69 63 65 6e 73 | 65 2c 20 6f 72 20 28 61 |e Licens|e, or (a|
|00003e60| 74 20 79 6f 75 72 20 6f | 70 74 69 6f 6e 29 20 61 |t your o|ption) a|
|00003e70| 6e 79 20 6c 61 74 65 72 | 20 76 65 72 73 69 6f 6e |ny later| version|
|00003e80| 2e 0a 58 20 2a 0a 58 20 | 2a 20 54 68 69 73 20 6c |..X *.X |* This l|
|00003e90| 69 62 72 61 72 79 20 69 | 73 20 64 69 73 74 72 69 |ibrary i|s distri|
|00003ea0| 62 75 74 65 64 20 69 6e | 20 74 68 65 20 68 6f 70 |buted in| the hop|
|00003eb0| 65 20 74 68 61 74 20 69 | 74 20 77 69 6c 6c 20 62 |e that i|t will b|
|00003ec0| 65 20 75 73 65 66 75 6c | 2c 0a 58 20 2a 20 62 75 |e useful|,.X * bu|
|00003ed0| 74 20 57 49 54 48 4f 55 | 54 20 41 4e 59 20 57 41 |t WITHOU|T ANY WA|
|00003ee0| 52 52 41 4e 54 59 3b 20 | 77 69 74 68 6f 75 74 20 |RRANTY; |without |
|00003ef0| 65 76 65 6e 20 74 68 65 | 20 69 6d 70 6c 69 65 64 |even the| implied|
|00003f00| 20 77 61 72 72 61 6e 74 | 79 20 6f 66 0a 58 20 2a | warrant|y of.X *|
|00003f10| 20 4d 45 52 43 48 41 4e | 54 41 42 49 4c 49 54 59 | MERCHAN|TABILITY|
|00003f20| 20 6f 72 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 | or FITN|ESS FOR |
|00003f30| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00003f40| 50 4f 53 45 2e 20 20 53 | 65 65 20 74 68 65 20 47 |POSE. S|ee the G|
|00003f50| 4e 55 0a 58 20 2a 20 4c | 69 62 72 61 72 79 20 47 |NU.X * L|ibrary G|
|00003f60| 65 6e 65 72 61 6c 20 50 | 75 62 6c 69 63 20 4c 69 |eneral P|ublic Li|
|00003f70| 63 65 6e 73 65 20 66 6f | 72 20 6d 6f 72 65 20 64 |cense fo|r more d|
|00003f80| 65 74 61 69 6c 73 2e 0a | 58 20 2a 0a 58 20 2a 20 |etails..|X *.X * |
|00003f90| 59 6f 75 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |You shou|ld have |
|00003fa0| 72 65 63 65 69 76 65 64 | 20 61 20 63 6f 70 79 20 |received| a copy |
|00003fb0| 6f 66 20 74 68 65 20 47 | 4e 55 20 4c 69 62 72 61 |of the G|NU Libra|
|00003fc0| 72 79 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |ry Gener|al Publi|
|00003fd0| 63 0a 58 20 2a 20 4c 69 | 63 65 6e 73 65 20 61 6c |c.X * Li|cense al|
|00003fe0| 6f 6e 67 20 77 69 74 68 | 20 74 68 69 73 20 6c 69 |ong with| this li|
|00003ff0| 62 72 61 72 79 20 28 73 | 65 65 20 43 4f 50 59 49 |brary (s|ee COPYI|
|00004000| 4e 47 2d 4c 49 42 29 3b | 20 69 66 20 6e 6f 74 2c |NG-LIB);| if not,|
|00004010| 20 77 72 69 74 65 20 74 | 6f 20 74 68 65 0a 58 20 | write t|o the.X |
|00004020| 2a 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |* Free S|oftware |
|00004030| 46 6f 75 6e 64 61 74 69 | 6f 6e 2c 20 49 6e 63 2e |Foundati|on, Inc.|
|00004040| 2c 20 36 37 35 20 4d 61 | 73 73 20 41 76 65 2c 20 |, 675 Ma|ss Ave, |
|00004050| 43 61 6d 62 72 69 64 67 | 65 2c 20 4d 41 20 30 32 |Cambridg|e, MA 02|
|00004060| 31 33 39 2c 20 55 53 41 | 2e 0a 58 20 2a 0a 58 20 |139, USA|..X *.X |
|00004070| 2a 20 54 68 65 20 61 75 | 74 68 6f 72 20 6f 66 20 |* The au|thor of |
|00004080| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 6d 61 79 20 |the prog|ram may |
|00004090| 62 65 20 63 6f 6e 74 61 | 63 74 65 64 20 61 74 20 |be conta|cted at |
|000040a0| 67 72 61 79 2e 77 61 74 | 73 6f 6e 40 61 6e 74 61 |gray.wat|son@anta|
|000040b0| 69 72 65 2e 63 6f 6d 0a | 58 20 2a 0a 58 20 2a 20 |ire.com.|X *.X * |
|000040c0| 24 49 64 3a 20 6d 61 6c | 6c 6f 63 2e 68 2c 76 20 |$Id: mal|loc.h,v |
|000040d0| 31 2e 32 31 20 31 39 39 | 33 2f 30 34 2f 30 36 20 |1.21 199|3/04/06 |
|000040e0| 30 34 3a 34 38 3a 30 39 | 20 67 72 61 79 20 45 78 |04:48:09| gray Ex|
|000040f0| 70 20 24 0a 58 20 2a 2f | 0a 58 0a 58 23 69 66 6e |p $.X */|.X.X#ifn|
|00004100| 64 65 66 20 5f 5f 4d 41 | 4c 4c 4f 43 5f 48 5f 5f |def __MA|LLOC_H__|
|00004110| 0a 58 23 64 65 66 69 6e | 65 20 5f 5f 4d 41 4c 4c |.X#defin|e __MALL|
|00004120| 4f 43 5f 48 5f 5f 0a 58 | 0a 58 2f 2a 0a 58 20 2a |OC_H__.X|.X/*.X *|
|00004130| 20 6d 61 6c 6c 6f 63 20 | 66 75 6e 63 74 69 6f 6e | malloc |function|
|00004140| 20 72 65 74 75 72 6e 20 | 63 6f 64 65 73 0a 58 20 | return |codes.X |
|00004150| 2a 2f 0a 58 23 64 65 66 | 69 6e 65 20 43 41 4c 4c |*/.X#def|ine CALL|
|00004160| 4f 43 5f 45 52 52 4f 52 | 09 09 30 09 09 2f 2a 20 |OC_ERROR|..0../* |
|00004170| 65 72 72 6f 72 20 66 72 | 6f 6d 20 63 61 6c 6c 6f |error fr|om callo|
|00004180| 63 20 2a 2f 0a 58 23 64 | 65 66 69 6e 65 20 4d 41 |c */.X#d|efine MA|
|00004190| 4c 4c 4f 43 5f 45 52 52 | 4f 52 09 09 30 09 09 2f |LLOC_ERR|OR..0../|
|000041a0| 2a 20 65 72 72 6f 72 20 | 66 72 6f 6d 20 6d 61 6c |* error |from mal|
|000041b0| 6c 6f 63 20 2a 2f 0a 58 | 23 64 65 66 69 6e 65 20 |loc */.X|#define |
|000041c0| 52 45 41 4c 4c 4f 43 5f | 45 52 52 4f 52 09 09 30 |REALLOC_|ERROR..0|
|000041d0| 09 09 2f 2a 20 65 72 72 | 6f 72 20 66 72 6f 6d 20 |../* err|or from |
|000041e0| 72 65 61 6c 6c 6f 63 20 | 2a 2f 0a 58 0a 58 23 64 |realloc |*/.X.X#d|
|000041f0| 65 66 69 6e 65 20 46 52 | 45 45 5f 45 52 52 4f 52 |efine FR|EE_ERROR|
|00004200| 09 09 30 09 09 2f 2a 20 | 65 72 72 6f 72 20 66 72 |..0../* |error fr|
|00004210| 6f 6d 20 66 72 65 65 20 | 2a 2f 0a 58 23 64 65 66 |om free |*/.X#def|
|00004220| 69 6e 65 20 46 52 45 45 | 5f 4e 4f 45 52 52 4f 52 |ine FREE|_NOERROR|
|00004230| 09 09 31 09 09 2f 2a 20 | 6e 6f 20 65 72 72 6f 72 |..1../* |no error|
|00004240| 20 66 72 6f 6d 20 66 72 | 65 65 20 2a 2f 0a 58 0a | from fr|ee */.X.|
|00004250| 58 23 64 65 66 69 6e 65 | 20 4d 41 4c 4c 4f 43 5f |X#define| MALLOC_|
|00004260| 56 45 52 49 46 59 5f 45 | 52 52 4f 52 09 30 09 09 |VERIFY_E|RROR.0..|
|00004270| 2f 2a 20 63 68 65 63 6b | 73 20 66 61 69 6c 65 64 |/* check|s failed|
|00004280| 2c 20 65 72 72 6f 72 20 | 2a 2f 0a 58 23 64 65 66 |, error |*/.X#def|
|00004290| 69 6e 65 20 4d 41 4c 4c | 4f 43 5f 56 45 52 49 46 |ine MALL|OC_VERIF|
|000042a0| 59 5f 4e 4f 45 52 52 4f | 52 09 31 09 09 2f 2a 20 |Y_NOERRO|R.1../* |
|000042b0| 63 68 65 63 6b 73 20 70 | 61 73 73 65 64 2c 20 6e |checks p|assed, n|
|000042c0| 6f 20 65 72 72 6f 72 20 | 2a 2f 0a 58 0a 58 2f 2a |o error |*/.X.X/*|
|000042d0| 0a 58 20 2a 20 64 65 66 | 61 75 6c 74 20 76 61 6c |.X * def|ault val|
|000042e0| 75 65 73 20 69 66 20 5f | 6d 61 6c 6c 6f 63 5f 66 |ues if _|malloc_f|
|000042f0| 69 6c 65 20 61 6e 64 20 | 5f 6d 61 6c 6c 6f 63 5f |ile and |_malloc_|
|00004300| 6c 69 6e 65 20 61 72 65 | 20 6e 6f 74 20 73 65 74 |line are| not set|
|00004310| 0a 58 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 4d |.X */.X#|define M|
|00004320| 41 4c 4c 4f 43 5f 44 45 | 46 41 55 4c 54 5f 46 49 |ALLOC_DE|FAULT_FI|
|00004330| 4c 45 09 22 75 6e 6b 6e | 6f 77 6e 22 0a 58 23 64 |LE."unkn|own".X#d|
|00004340| 65 66 69 6e 65 20 4d 41 | 4c 4c 4f 43 5f 44 45 46 |efine MA|LLOC_DEF|
|00004350| 41 55 4c 54 5f 4c 49 4e | 45 09 30 0a 58 0a 58 2f |AULT_LIN|E.0.X.X/|
|00004360| 2a 0a 58 20 2a 20 67 6c | 6f 62 61 6c 20 76 61 72 |*.X * gl|obal var|
|00004370| 69 61 62 6c 65 20 61 6e | 64 20 70 72 6f 63 65 64 |iable an|d proced|
|00004380| 75 72 65 20 73 63 6f 70 | 69 6e 67 20 66 6f 72 20 |ure scop|ing for |
|00004390| 63 6f 64 65 20 72 65 61 | 64 61 62 69 6c 69 74 79 |code rea|dability|
|000043a0| 0a 58 20 2a 2f 0a 58 23 | 75 6e 64 65 66 09 45 58 |.X */.X#|undef.EX|
|000043b0| 50 4f 52 54 0a 58 23 64 | 65 66 69 6e 65 09 45 58 |PORT.X#d|efine.EX|
|000043c0| 50 4f 52 54 0a 58 0a 58 | 23 75 6e 64 65 66 09 49 |PORT.X.X|#undef.I|
|000043d0| 4d 50 4f 52 54 0a 58 23 | 64 65 66 69 6e 65 09 49 |MPORT.X#|define.I|
|000043e0| 4d 50 4f 52 54 09 09 65 | 78 74 65 72 6e 0a 58 0a |MPORT..e|xtern.X.|
|000043f0| 58 23 75 6e 64 65 66 09 | 4c 4f 43 41 4c 0a 58 23 |X#undef.|LOCAL.X#|
|00004400| 64 65 66 69 6e 65 09 4c | 4f 43 41 4c 09 09 73 74 |define.L|OCAL..st|
|00004410| 61 74 69 63 0a 58 0a 58 | 23 69 66 20 5f 5f 47 4e |atic.X.X|#if __GN|
|00004420| 55 43 5f 5f 20 3c 20 32 | 0a 58 2f 2a 0a 58 20 2a |UC__ < 2|.X/*.X *|
|00004430| 20 70 72 6f 74 6f 74 79 | 70 65 20 66 6f 72 20 6d | prototy|pe for m|
|00004440| 65 6d 6f 72 79 20 63 6f | 70 79 2e 20 20 6e 65 65 |emory co|py. nee|
|00004450| 64 65 64 20 66 6f 72 20 | 62 65 6c 6f 77 20 6d 61 |ded for |below ma|
|00004460| 63 72 6f 73 2e 0a 58 20 | 2a 2f 0a 58 49 4d 50 4f |cros..X |*/.XIMPO|
|00004470| 52 54 09 63 68 61 72 09 | 2a 6d 65 6d 63 70 79 28 |RT.char.|*memcpy(|
|00004480| 63 68 61 72 20 2a 20 74 | 6f 2c 20 63 68 61 72 20 |char * t|o, char |
|00004490| 2a 20 66 72 6f 6d 2c 20 | 69 6e 74 20 6c 65 6e 67 |* from, |int leng|
|000044a0| 74 68 29 3b 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 |th);.X#e|ndif.X.X|
|000044b0| 2f 2a 0a 58 20 2a 20 6d | 65 6d 6f 72 79 20 63 6f |/*.X * m|emory co|
|000044c0| 70 79 3a 20 63 6f 70 79 | 20 53 49 5a 45 20 62 79 |py: copy| SIZE by|
|000044d0| 74 65 73 20 66 72 6f 6d | 20 70 6f 69 6e 74 65 72 |tes from| pointer|
|000044e0| 20 46 52 4f 4d 20 74 6f | 20 70 6f 69 6e 74 65 72 | FROM to| pointer|
|000044f0| 20 54 4f 0a 58 20 2a 2f | 0a 58 23 64 65 66 69 6e | TO.X */|.X#defin|
|00004500| 65 20 4d 45 4d 4f 52 59 | 5f 43 4f 50 59 28 66 72 |e MEMORY|_COPY(fr|
|00004510| 6f 6d 2c 20 74 6f 2c 20 | 73 69 7a 65 29 09 28 76 |om, to, |size).(v|
|00004520| 6f 69 64 29 6d 65 6d 63 | 70 79 28 28 63 68 61 72 |oid)memc|py((char|
|00004530| 20 2a 29 74 6f 2c 20 5c | 0a 58 09 09 09 09 09 09 | *)to, \|.X......|
|00004540| 20 20 20 20 20 28 63 68 | 61 72 20 2a 29 66 72 6f | (ch|ar *)fro|
|00004550| 6d 2c 20 73 69 7a 65 29 | 0a 58 0a 58 2f 2a 0a 58 |m, size)|.X.X/*.X|
|00004560| 20 2a 20 61 6c 6c 6f 63 | 20 6d 61 63 72 6f 73 20 | * alloc| macros |
|00004570| 74 6f 20 69 6d 70 72 6f | 76 65 20 6d 65 6d 6f 72 |to impro|ve memor|
|00004580| 79 20 75 73 61 67 65 20 | 72 65 61 64 69 62 69 6c |y usage |readibil|
|00004590| 69 74 79 2e 2e 2e 0a 58 | 20 2a 2f 0a 58 23 75 6e |ity....X| */.X#un|
|000045a0| 64 65 66 20 41 4c 4c 4f | 43 0a 58 23 75 6e 64 65 |def ALLO|C.X#unde|
|000045b0| 66 20 43 41 4c 4c 4f 43 | 0a 58 23 75 6e 64 65 66 |f CALLOC|.X#undef|
|000045c0| 20 4d 41 4c 4c 4f 43 0a | 58 23 75 6e 64 65 66 20 | MALLOC.|X#undef |
|000045d0| 52 45 41 4c 4c 4f 43 0a | 58 23 75 6e 64 65 66 20 |REALLOC.|X#undef |
|000045e0| 52 45 4d 41 4c 4c 4f 43 | 0a 58 23 75 6e 64 65 66 |REMALLOC|.X#undef|
|000045f0| 20 46 52 45 45 0a 58 0a | 58 23 64 65 66 69 6e 65 | FREE.X.|X#define|
|00004600| 20 41 4c 4c 4f 43 28 74 | 79 70 65 2c 20 63 6f 75 | ALLOC(t|ype, cou|
|00004610| 6e 74 29 20 5c 0a 58 20 | 20 28 74 79 70 65 20 2a |nt) \.X | (type *|
|00004620| 29 6d 61 6c 6c 6f 63 28 | 28 75 6e 73 69 67 6e 65 |)malloc(|(unsigne|
|00004630| 64 20 69 6e 74 29 28 73 | 69 7a 65 6f 66 28 74 79 |d int)(s|izeof(ty|
|00004640| 70 65 29 20 2a 20 28 63 | 6f 75 6e 74 29 29 29 0a |pe) * (c|ount))).|
|00004650| 58 0a 58 23 64 65 66 69 | 6e 65 20 4d 41 4c 4c 4f |X.X#defi|ne MALLO|
|00004660| 43 28 73 69 7a 65 29 20 | 5c 0a 58 20 20 28 63 68 |C(size) |\.X (ch|
|00004670| 61 72 20 2a 29 6d 61 6c | 6c 6f 63 28 28 75 6e 73 |ar *)mal|loc((uns|
|00004680| 69 67 6e 65 64 20 69 6e | 74 29 28 73 69 7a 65 29 |igned in|t)(size)|
|00004690| 29 0a 58 0a 58 2f 2a 20 | 57 41 52 4e 49 4e 47 3a |).X.X/* |WARNING:|
|000046a0| 20 6e 6f 74 69 63 65 20 | 74 68 61 74 20 74 68 65 | notice |that the|
|000046b0| 20 61 72 67 75 6d 65 6e | 74 73 20 61 72 65 20 52 | argumen|ts are R|
|000046c0| 45 56 45 52 53 45 44 20 | 66 72 6f 6d 20 6e 6f 72 |EVERSED |from nor|
|000046d0| 6d 61 6c 20 63 61 6c 6c | 6f 63 28 29 20 2a 2f 0a |mal call|oc() */.|
|000046e0| 58 23 64 65 66 69 6e 65 | 20 43 41 4c 4c 4f 43 28 |X#define| CALLOC(|
|000046f0| 74 79 70 65 2c 20 63 6f | 75 6e 74 29 20 5c 0a 58 |type, co|unt) \.X|
|00004700| 20 20 28 74 79 70 65 20 | 2a 29 63 61 6c 6c 6f 63 | (type |*)calloc|
|00004710| 28 28 75 6e 73 69 67 6e | 65 64 20 69 6e 74 29 28 |((unsign|ed int)(|
|00004720| 63 6f 75 6e 74 29 2c 20 | 28 75 6e 73 69 67 6e 65 |count), |(unsigne|
|00004730| 64 20 69 6e 74 29 73 69 | 7a 65 6f 66 28 74 79 70 |d int)si|zeof(typ|
|00004740| 65 29 29 0a 58 0a 58 23 | 64 65 66 69 6e 65 20 52 |e)).X.X#|define R|
|00004750| 45 41 4c 4c 4f 43 28 70 | 74 72 2c 20 74 79 70 65 |EALLOC(p|tr, type|
|00004760| 2c 20 63 6f 75 6e 74 29 | 20 5c 0a 58 20 20 28 74 |, count)| \.X (t|
|00004770| 79 70 65 20 2a 29 72 65 | 61 6c 6c 6f 63 28 28 63 |ype *)re|alloc((c|
|00004780| 68 61 72 20 2a 29 28 70 | 74 72 29 2c 20 28 75 6e |har *)(p|tr), (un|
|00004790| 73 69 67 6e 65 64 20 69 | 6e 74 29 28 73 69 7a 65 |signed i|nt)(size|
|000047a0| 6f 66 28 74 79 70 65 29 | 20 2a 20 28 63 6f 75 6e |of(type)| * (coun|
|000047b0| 74 29 29 29 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 |t))).X.X|#define |
|000047c0| 52 45 4d 41 4c 4c 4f 43 | 28 70 74 72 2c 20 73 69 |REMALLOC|(ptr, si|
|000047d0| 7a 65 29 20 5c 0a 58 20 | 20 28 63 68 61 72 20 2a |ze) \.X | (char *|
|000047e0| 29 72 65 61 6c 6c 6f 63 | 28 28 63 68 61 72 20 2a |)realloc|((char *|
|000047f0| 29 28 70 74 72 29 2c 20 | 28 75 6e 73 69 67 6e 65 |)(ptr), |(unsigne|
|00004800| 64 20 69 6e 74 29 28 73 | 69 7a 65 29 29 0a 58 0a |d int)(s|ize)).X.|
|00004810| 58 23 64 65 66 69 6e 65 | 20 46 52 45 45 28 70 74 |X#define| FREE(pt|
|00004820| 72 29 20 5c 0a 58 20 20 | 66 72 65 65 28 28 63 68 |r) \.X |free((ch|
|00004830| 61 72 20 2a 29 28 70 74 | 72 29 29 0a 58 0a 58 2f |ar *)(pt|r)).X.X/|
|00004840| 2a 0a 58 20 2a 20 73 6f | 6d 65 20 73 6d 61 6c 6c |*.X * so|me small|
|00004850| 20 61 6c 6c 6f 63 61 74 | 69 6f 6e 20 6d 61 63 72 | allocat|ion macr|
|00004860| 6f 73 0a 58 20 2a 2f 0a | 58 0a 58 23 69 66 64 65 |os.X */.|X.X#ifde|
|00004870| 66 20 5f 5f 47 4e 55 43 | 5f 5f 0a 58 0a 58 2f 2a |f __GNUC|__.X.X/*|
|00004880| 0a 58 20 2a 20 64 75 70 | 6c 69 63 61 74 65 20 42 |.X * dup|licate B|
|00004890| 55 46 20 6f 66 20 53 49 | 5a 45 20 62 79 74 65 73 |UF of SI|ZE bytes|
|000048a0| 0a 58 20 2a 2f 0a 58 23 | 64 65 66 69 6e 65 20 42 |.X */.X#|define B|
|000048b0| 44 55 50 28 62 75 66 2c | 20 73 69 7a 65 29 09 28 |DUP(buf,| size).(|
|000048c0| 7b 20 5c 0a 58 09 09 09 | 20 20 63 68 61 72 09 2a |{ \.X...| char.*|
|000048d0| 5f 72 65 74 3b 20 5c 0a | 58 09 09 09 20 20 69 6e |_ret; \.|X... in|
|000048e0| 74 09 5f 73 69 7a 65 20 | 3d 20 28 73 69 7a 65 29 |t._size |= (size)|
|000048f0| 3b 20 5c 0a 58 09 09 09 | 20 20 20 5c 0a 58 09 09 |; \.X...| \.X..|
|00004900| 09 20 20 5f 72 65 74 20 | 3d 20 4d 41 4c 4c 4f 43 |. _ret |= MALLOC|
|00004910| 28 5f 73 69 7a 65 29 3b | 20 5c 0a 58 09 09 09 20 |(_size);| \.X... |
|00004920| 20 69 66 20 28 5f 72 65 | 74 20 21 3d 20 4e 55 4c | if (_re|t != NUL|
|00004930| 4c 29 20 5c 0a 58 09 09 | 09 20 20 20 20 4d 45 4d |L) \.X..|. MEM|
|00004940| 4f 52 59 5f 43 4f 50 59 | 28 28 62 75 66 29 2c 20 |ORY_COPY|((buf), |
|00004950| 5f 72 65 74 2c 20 5f 73 | 69 7a 65 29 3b 20 5c 0a |_ret, _s|ize); \.|
|00004960| 58 09 09 09 20 20 20 5c | 0a 58 09 09 09 20 20 5f |X... \|.X... _|
|00004970| 72 65 74 3b 20 5c 0a 58 | 09 09 09 7d 29 0a 58 0a |ret; \.X|...}).X.|
|00004980| 58 2f 2a 0a 58 20 2a 20 | 74 68 65 20 73 74 72 64 |X/*.X * |the strd|
|00004990| 75 70 28 29 20 66 75 6e | 63 74 69 6f 6e 20 69 6e |up() fun|ction in|
|000049a0| 20 6d 61 63 72 6f 20 66 | 6f 72 6d 2e 20 20 64 75 | macro f|orm. du|
|000049b0| 70 6c 69 63 61 74 65 20 | 73 74 72 69 6e 67 20 53 |plicate |string S|
|000049c0| 54 52 0a 58 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |TR.X */.|X#define|
|000049d0| 20 53 54 52 44 55 50 28 | 73 74 72 29 09 28 7b 20 | STRDUP(|str).({ |
|000049e0| 5c 0a 58 09 09 09 20 20 | 63 6f 6e 73 74 20 63 68 |\.X... |const ch|
|000049f0| 61 72 20 2a 5f 73 74 72 | 70 20 3d 20 28 73 74 72 |ar *_str|p = (str|
|00004a00| 29 3b 20 5c 0a 58 09 09 | 09 20 20 63 68 61 72 09 |); \.X..|. char.|
|00004a10| 2a 5f 72 65 74 3b 20 5c | 0a 58 09 09 09 20 20 69 |*_ret; \|.X... i|
|00004a20| 6e 74 09 5f 6c 65 6e 3b | 20 5c 0a 58 09 09 09 20 |nt._len;| \.X... |
|00004a30| 20 20 5c 0a 58 09 09 09 | 20 20 5f 6c 65 6e 20 3d | \.X...| _len =|
|00004a40| 20 73 74 72 6c 65 6e 28 | 5f 73 74 72 70 29 3b 20 | strlen(|_strp); |
|00004a50| 5c 0a 58 09 09 09 20 20 | 5f 72 65 74 20 3d 20 4d |\.X... |_ret = M|
|00004a60| 41 4c 4c 4f 43 28 5f 6c | 65 6e 20 2b 20 31 29 3b |ALLOC(_l|en + 1);|
|00004a70| 20 5c 0a 58 09 09 09 20 | 20 69 66 20 28 5f 72 65 | \.X... | if (_re|
|00004a80| 74 20 21 3d 20 4e 55 4c | 4c 29 20 5c 0a 58 09 09 |t != NUL|L) \.X..|
|00004a90| 09 20 20 20 20 4d 45 4d | 4f 52 59 5f 43 4f 50 59 |. MEM|ORY_COPY|
|00004aa0| 28 5f 73 74 72 70 2c 20 | 5f 72 65 74 2c 20 5f 6c |(_strp, |_ret, _l|
|00004ab0| 65 6e 20 2b 20 31 29 3b | 20 5c 0a 58 09 09 09 20 |en + 1);| \.X... |
|00004ac0| 20 20 5c 0a 58 09 09 09 | 20 20 5f 72 65 74 3b 20 | \.X...| _ret; |
|00004ad0| 5c 0a 58 09 09 09 7d 29 | 0a 58 0a 58 23 65 6c 73 |\.X...})|.X.X#els|
|00004ae0| 65 20 2f 2a 20 21 20 5f | 5f 47 4e 55 43 5f 5f 20 |e /* ! _|_GNUC__ |
|00004af0| 2a 2f 0a 58 0a 58 2f 2a | 0a 58 20 2a 20 64 75 70 |*/.X.X/*|.X * dup|
|00004b00| 6c 69 63 61 74 65 20 42 | 55 46 20 6f 66 20 53 49 |licate B|UF of SI|
|00004b10| 5a 45 20 61 6e 64 20 72 | 65 74 75 72 6e 20 74 68 |ZE and r|eturn th|
|00004b20| 65 20 6e 65 77 20 61 64 | 64 72 65 73 73 20 69 6e |e new ad|dress in|
|00004b30| 20 4f 55 54 0a 58 20 2a | 2f 0a 58 23 64 65 66 69 | OUT.X *|/.X#defi|
|00004b40| 6e 65 20 42 44 55 50 28 | 62 75 66 2c 20 73 69 7a |ne BDUP(|buf, siz|
|00004b50| 65 2c 20 6f 75 74 29 09 | 64 6f 20 7b 20 5c 0a 58 |e, out).|do { \.X|
|00004b60| 09 09 09 09 20 20 63 68 | 61 72 09 2a 5f 72 65 74 |.... ch|ar.*_ret|
|00004b70| 3b 20 5c 0a 58 09 09 09 | 09 20 20 69 6e 74 09 5f |; \.X...|. int._|
|00004b80| 73 69 7a 65 20 3d 20 28 | 73 69 7a 65 29 3b 20 5c |size = (|size); \|
|00004b90| 0a 58 09 09 09 09 20 20 | 20 5c 0a 58 09 09 09 09 |.X.... | \.X....|
|00004ba0| 20 20 5f 72 65 74 20 3d | 20 4d 41 4c 4c 4f 43 28 | _ret =| MALLOC(|
|00004bb0| 5f 73 69 7a 65 29 3b 20 | 5c 0a 58 09 09 09 09 20 |_size); |\.X.... |
|00004bc0| 20 69 66 20 28 5f 72 65 | 74 20 21 3d 20 4e 55 4c | if (_re|t != NUL|
|00004bd0| 4c 29 20 5c 0a 58 09 09 | 09 09 20 20 20 20 4d 45 |L) \.X..|.. ME|
|00004be0| 4d 4f 52 59 5f 43 4f 50 | 59 28 28 62 75 66 29 2c |MORY_COP|Y((buf),|
|00004bf0| 20 5f 72 65 74 2c 20 5f | 73 69 7a 65 29 3b 20 5c | _ret, _|size); \|
|00004c00| 0a 58 09 09 09 09 20 20 | 20 5c 0a 58 09 09 09 09 |.X.... | \.X....|
|00004c10| 20 20 28 6f 75 74 29 20 | 3d 20 5f 72 65 74 3b 20 | (out) |= _ret; |
|00004c20| 5c 0a 58 09 09 09 09 7d | 20 77 68 69 6c 65 28 30 |\.X....}| while(0|
|00004c30| 29 0a 58 0a 58 2f 2a 0a | 58 20 2a 20 73 74 72 64 |).X.X/*.|X * strd|
|00004c40| 75 70 28 29 20 69 6e 20 | 6d 61 63 72 6f 20 66 6f |up() in |macro fo|
|00004c50| 72 6d 2e 20 20 64 75 70 | 6c 69 63 61 74 65 20 73 |rm. dup|licate s|
|00004c60| 74 72 69 6e 67 20 53 54 | 52 20 61 6e 64 20 72 65 |tring ST|R and re|
|00004c70| 74 75 72 6e 20 61 20 63 | 6f 70 79 20 69 6e 20 4f |turn a c|opy in O|
|00004c80| 55 54 0a 58 20 2a 2f 0a | 58 23 64 65 66 69 6e 65 |UT.X */.|X#define|
|00004c90| 20 53 54 52 44 55 50 28 | 73 74 72 2c 20 6f 75 74 | STRDUP(|str, out|
|00004ca0| 29 09 64 6f 20 7b 20 5c | 0a 58 09 09 09 09 20 20 |).do { \|.X.... |
|00004cb0| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 5f 73 74 72 |const ch|ar *_str|
|00004cc0| 70 20 3d 20 28 73 74 72 | 29 3b 20 5c 0a 58 09 09 |p = (str|); \.X..|
|00004cd0| 09 09 20 20 63 68 61 72 | 09 2a 5f 72 65 74 3b 20 |.. char|.*_ret; |
|00004ce0| 5c 0a 58 09 09 09 09 20 | 20 69 6e 74 09 5f 6c 65 |\.X.... | int._le|
|00004cf0| 6e 3b 20 5c 0a 58 09 09 | 09 09 20 20 20 5c 0a 58 |n; \.X..|.. \.X|
|00004d00| 09 09 09 09 20 20 5f 6c | 65 6e 20 3d 20 73 74 72 |.... _l|en = str|
|00004d10| 6c 65 6e 28 5f 73 74 72 | 70 29 3b 20 5c 0a 58 09 |len(_str|p); \.X.|
|00004d20| 09 09 09 20 20 5f 72 65 | 74 20 3d 20 4d 41 4c 4c |... _re|t = MALL|
|00004d30| 4f 43 28 5f 6c 65 6e 20 | 2b 20 31 29 3b 20 5c 0a |OC(_len |+ 1); \.|
|00004d40| 58 09 09 09 09 20 20 69 | 66 20 28 5f 72 65 74 20 |X.... i|f (_ret |
|00004d50| 21 3d 20 4e 55 4c 4c 29 | 20 5c 0a 58 09 09 09 09 |!= NULL)| \.X....|
|00004d60| 20 20 20 20 4d 45 4d 4f | 52 59 5f 43 4f 50 59 28 | MEMO|RY_COPY(|
|00004d70| 5f 73 74 72 70 2c 20 5f | 72 65 74 2c 20 5f 6c 65 |_strp, _|ret, _le|
|00004d80| 6e 20 2b 20 31 29 3b 20 | 5c 0a 58 09 09 09 09 20 |n + 1); |\.X.... |
|00004d90| 20 20 5c 0a 58 09 09 09 | 09 20 20 28 6f 75 74 29 | \.X...|. (out)|
|00004da0| 20 3d 20 5f 72 65 74 3b | 20 5c 0a 58 09 09 09 09 | = _ret;| \.X....|
|00004db0| 7d 20 77 68 69 6c 65 28 | 30 29 0a 58 0a 58 23 65 |} while(|0).X.X#e|
|00004dc0| 6e 64 69 66 20 2f 2a 20 | 21 20 5f 5f 47 4e 55 43 |ndif /* |! __GNUC|
|00004dd0| 5f 5f 20 2a 2f 0a 58 0a | 58 2f 2a 3c 3c 3c 3c 3c |__ */.X.|X/*<<<<<|
|00004de0| 3c 3c 3c 3c 3c 20 20 54 | 68 65 20 62 65 6c 6f 77 |<<<<< T|he below|
|00004df0| 20 70 72 6f 74 6f 74 79 | 70 65 73 20 61 72 65 20 | prototy|pes are |
|00004e00| 61 75 74 6f 2d 67 65 6e | 65 72 61 74 65 64 20 62 |auto-gen|erated b|
|00004e10| 79 20 66 69 6c 6c 70 72 | 6f 74 6f 20 2a 2f 0a 58 |y fillpr|oto */.X|
|00004e20| 0a 58 2f 2a 20 6c 6f 67 | 66 69 6c 65 20 66 6f 72 |.X/* log|file for|
|00004e30| 20 64 75 6d 70 69 6e 67 | 20 6d 61 6c 6c 6f 63 20 | dumping| malloc |
|00004e40| 69 6e 66 6f 2c 20 4d 41 | 4c 4c 4f 43 5f 4c 4f 47 |info, MA|LLOC_LOG|
|00004e50| 46 49 4c 45 20 65 6e 76 | 2e 20 76 61 72 20 6f 76 |FILE env|. var ov|
|00004e60| 65 72 72 69 64 65 73 20 | 74 68 69 73 20 2a 2f 0a |errides |this */.|
|00004e70| 58 49 4d 50 4f 52 54 09 | 63 68 61 72 09 09 2a 6d |XIMPORT.|char..*m|
|00004e80| 61 6c 6c 6f 63 5f 6c 6f | 67 70 61 74 68 3b 0a 58 |alloc_lo|gpath;.X|
|00004e90| 0a 58 2f 2a 20 69 6e 74 | 65 72 6e 61 6c 20 6d 61 |.X/* int|ernal ma|
|00004ea0| 6c 6c 6f 63 20 65 72 72 | 6f 72 20 6e 75 6d 62 65 |lloc err|or numbe|
|00004eb0| 72 20 66 6f 72 20 72 65 | 66 65 72 65 6e 63 65 20 |r for re|ference |
|00004ec0| 70 75 72 70 6f 73 65 73 | 20 6f 6e 6c 79 20 2a 2f |purposes| only */|
|00004ed0| 0a 58 49 4d 50 4f 52 54 | 09 69 6e 74 09 09 6d 61 |.XIMPORT|.int..ma|
|00004ee0| 6c 6c 6f 63 5f 65 72 72 | 6e 6f 3b 0a 58 0a 58 2f |lloc_err|no;.X.X/|
|00004ef0| 2a 0a 58 20 2a 20 73 68 | 75 74 64 6f 77 6e 20 6d |*.X * sh|utdown m|
|00004f00| 65 6d 6f 72 79 2d 61 6c | 6c 6f 63 61 74 69 6f 6e |emory-al|location|
|00004f10| 20 6d 6f 64 75 6c 65 2c | 20 70 72 6f 76 69 64 65 | module,| provide|
|00004f20| 20 73 74 61 74 69 73 74 | 69 63 73 20 69 66 20 6e | statist|ics if n|
|00004f30| 65 63 65 73 73 61 72 79 | 0a 58 20 2a 2f 0a 58 49 |ecessary|.X */.XI|
|00004f40| 4d 50 4f 52 54 09 76 6f | 69 64 09 6d 61 6c 6c 6f |MPORT.vo|id.mallo|
|00004f50| 63 5f 73 68 75 74 64 6f | 77 6e 28 76 6f 69 64 29 |c_shutdo|wn(void)|
|00004f60| 3b 0a 58 0a 58 2f 2a 0a | 58 20 2a 20 61 6c 6c 6f |;.X.X/*.|X * allo|
|00004f70| 63 61 74 65 20 61 6e 64 | 20 72 65 74 75 72 6e 20 |cate and| return |
|00004f80| 61 20 53 49 5a 45 20 62 | 6c 6f 63 6b 20 6f 66 20 |a SIZE b|lock of |
|00004f90| 62 79 74 65 73 0a 58 20 | 2a 2f 0a 58 49 4d 50 4f |bytes.X |*/.XIMPO|
|00004fa0| 52 54 09 63 68 61 72 09 | 2a 6d 61 6c 6c 6f 63 28 |RT.char.|*malloc(|
|00004fb0| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 73 69 7a |unsigned| int siz|
|00004fc0| 65 29 3b 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 61 6c |e);.X.X/|*.X * al|
|00004fd0| 6c 6f 63 61 74 65 20 61 | 6e 64 20 72 65 74 75 72 |locate a|nd retur|
|00004fe0| 6e 20 61 20 62 6c 6f 63 | 6b 20 6f 66 20 62 79 74 |n a bloc|k of byt|
|00004ff0| 65 73 20 61 62 6c 65 20 | 74 6f 20 68 6f 6c 64 20 |es able |to hold |
|00005000| 4e 55 4d 5f 45 4c 45 4d | 45 4e 54 53 20 6f 66 20 |NUM_ELEM|ENTS of |
|00005010| 65 6c 65 6d 65 6e 74 73 | 0a 58 20 2a 20 6f 66 20 |elements|.X * of |
|00005020| 53 49 5a 45 20 62 79 74 | 65 73 20 61 6e 64 20 7a |SIZE byt|es and z|
|00005030| 65 72 6f 20 74 68 65 20 | 62 6c 6f 63 6b 0a 58 20 |ero the |block.X |
|00005040| 2a 2f 0a 58 49 4d 50 4f | 52 54 09 63 68 61 72 09 |*/.XIMPO|RT.char.|
|00005050| 2a 63 61 6c 6c 6f 63 28 | 75 6e 73 69 67 6e 65 64 |*calloc(|unsigned|
|00005060| 20 69 6e 74 20 6e 75 6d | 5f 65 6c 65 6d 65 6e 74 | int num|_element|
|00005070| 73 2c 20 75 6e 73 69 67 | 6e 65 64 20 69 6e 74 20 |s, unsig|ned int |
|00005080| 73 69 7a 65 29 3b 0a 58 | 0a 58 2f 2a 0a 58 20 2a |size);.X|.X/*.X *|
|00005090| 20 72 65 73 69 7a 65 73 | 20 4f 4c 44 5f 50 4e 54 | resizes| OLD_PNT|
|000050a0| 20 74 6f 20 53 49 5a 45 | 20 62 79 74 65 73 20 61 | to SIZE| bytes a|
|000050b0| 6e 64 20 72 65 74 75 72 | 6e 20 74 68 65 20 6e 65 |nd retur|n the ne|
|000050c0| 77 20 73 70 61 63 65 20 | 61 66 74 65 72 20 65 69 |w space |after ei|
|000050d0| 74 68 65 72 20 63 6f 70 | 79 69 6e 67 0a 58 20 2a |ther cop|ying.X *|
|000050e0| 20 61 6c 6c 20 6f 66 20 | 4f 4c 44 5f 50 4e 54 20 | all of |OLD_PNT |
|000050f0| 74 6f 20 74 68 65 20 6e | 65 77 20 61 72 65 61 20 |to the n|ew area |
|00005100| 6f 72 20 74 72 75 6e 63 | 61 74 69 6e 67 0a 58 20 |or trunc|ating.X |
|00005110| 2a 2f 0a 58 49 4d 50 4f | 52 54 09 63 68 61 72 09 |*/.XIMPO|RT.char.|
|00005120| 2a 72 65 61 6c 6c 6f 63 | 28 63 68 61 72 20 2a 20 |*realloc|(char * |
|00005130| 6f 6c 64 5f 70 6e 74 2c | 20 75 6e 73 69 67 6e 65 |old_pnt,| unsigne|
|00005140| 64 20 69 6e 74 20 6e 65 | 77 5f 73 69 7a 65 29 3b |d int ne|w_size);|
|00005150| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 72 65 6c 65 61 |.X.X/*.X| * relea|
|00005160| 73 65 20 50 4e 54 20 69 | 6e 20 74 68 65 20 68 65 |se PNT i|n the he|
|00005170| 61 70 2c 20 72 65 74 75 | 72 6e 69 6e 67 20 46 52 |ap, retu|rning FR|
|00005180| 45 45 5f 5b 4e 4f 5d 45 | 52 52 4f 52 0a 58 20 2a |EE_[NO]E|RROR.X *|
|00005190| 2f 0a 58 49 4d 50 4f 52 | 54 09 69 6e 74 09 66 72 |/.XIMPOR|T.int.fr|
|000051a0| 65 65 28 63 68 61 72 20 | 2a 20 70 6e 74 29 3b 0a |ee(char |* pnt);.|
|000051b0| 58 0a 58 2f 2a 0a 58 20 | 2a 20 63 61 6c 6c 20 74 |X.X/*.X |* call t|
|000051c0| 68 72 6f 75 67 68 20 74 | 6f 20 5f 68 65 61 70 5f |hrough t|o _heap_|
|000051d0| 6d 61 70 20 66 75 6e 63 | 74 69 6f 6e 2c 20 72 65 |map func|tion, re|
|000051e0| 74 75 72 6e 73 20 5b 4e | 4f 5d 45 52 52 4f 52 0a |turns [N|O]ERROR.|
|000051f0| 58 20 2a 2f 0a 58 49 4d | 50 4f 52 54 09 69 6e 74 |X */.XIM|PORT.int|
|00005200| 09 6d 61 6c 6c 6f 63 5f | 68 65 61 70 5f 6d 61 70 |.malloc_|heap_map|
|00005210| 28 76 6f 69 64 29 3b 0a | 58 0a 58 2f 2a 0a 58 20 |(void);.|X.X/*.X |
|00005220| 2a 20 76 65 72 69 66 79 | 20 70 6f 69 6e 74 65 72 |* verify| pointer|
|00005230| 20 50 4e 54 2c 20 69 66 | 20 50 4e 54 20 69 73 20 | PNT, if| PNT is |
|00005240| 30 20 74 68 65 6e 20 63 | 68 65 63 6b 20 74 68 65 |0 then c|heck the|
|00005250| 20 65 6e 74 69 72 65 20 | 68 65 61 70 2e 0a 58 20 | entire |heap..X |
|00005260| 2a 20 72 65 74 75 72 6e | 73 20 4d 41 4c 4c 4f 43 |* return|s MALLOC|
|00005270| 5f 56 45 52 49 46 59 5f | 5b 4e 4f 5d 45 52 52 4f |_VERIFY_|[NO]ERRO|
|00005280| 52 0a 58 20 2a 2f 0a 58 | 49 4d 50 4f 52 54 09 69 |R.X */.X|IMPORT.i|
|00005290| 6e 74 09 6d 61 6c 6c 6f | 63 5f 76 65 72 69 66 79 |nt.mallo|c_verify|
|000052a0| 28 63 68 61 72 20 2a 20 | 70 6e 74 29 3b 0a 58 0a |(char * |pnt);.X.|
|000052b0| 58 2f 2a 0a 58 20 2a 20 | 73 65 74 20 74 68 65 20 |X/*.X * |set the |
|000052c0| 67 6c 6f 62 61 6c 20 64 | 65 62 75 67 20 66 75 6e |global d|ebug fun|
|000052d0| 63 74 69 6f 6e 61 6c 69 | 74 79 20 66 6c 61 67 73 |ctionali|ty flags|
|000052e0| 20 74 6f 20 44 45 42 55 | 47 20 28 30 20 74 6f 20 | to DEBU|G (0 to |
|000052f0| 64 69 73 61 62 6c 65 29 | 2e 0a 58 20 2a 20 72 65 |disable)|..X * re|
|00005300| 74 75 72 6e 73 20 5b 4e | 4f 5d 45 52 52 4f 52 0a |turns [N|O]ERROR.|
|00005310| 58 20 2a 2f 0a 58 49 4d | 50 4f 52 54 09 69 6e 74 |X */.XIM|PORT.int|
|00005320| 09 6d 61 6c 6c 6f 63 5f | 64 65 62 75 67 28 69 6e |.malloc_|debug(in|
|00005330| 74 20 64 65 62 75 67 29 | 3b 0a 58 0a 58 2f 2a 0a |t debug)|;.X.X/*.|
|00005340| 58 20 2a 20 65 78 61 6d | 69 6e 65 20 70 6f 69 6e |X * exam|ine poin|
|00005350| 74 65 72 20 50 4e 54 20 | 61 6e 64 20 72 65 74 75 |ter PNT |and retu|
|00005360| 72 6e 73 20 53 49 5a 45 | 2c 20 61 6e 64 20 46 49 |rns SIZE|, and FI|
|00005370| 4c 45 20 2f 20 4c 49 4e | 45 20 69 6e 66 6f 20 6f |LE / LIN|E info o|
|00005380| 6e 20 69 74 0a 58 20 2a | 20 69 66 20 61 6e 79 20 |n it.X *| if any |
|00005390| 6f 66 20 74 68 65 20 70 | 6f 69 6e 74 65 72 73 20 |of the p|ointers |
|000053a0| 61 72 65 20 6e 6f 74 20 | 4e 55 4c 4c 2e 0a 58 20 |are not |NULL..X |
|000053b0| 2a 20 72 65 74 75 72 6e | 73 20 4e 4f 45 52 52 4f |* return|s NOERRO|
|000053c0| 52 20 6f 72 20 45 52 52 | 4f 52 20 64 65 70 65 6e |R or ERR|OR depen|
|000053d0| 64 69 6e 67 20 6f 6e 20 | 77 68 65 74 68 65 72 20 |ding on |whether |
|000053e0| 50 4e 54 20 69 73 20 67 | 6f 6f 64 20 6f 72 20 6e |PNT is g|ood or n|
|000053f0| 6f 74 0a 58 20 2a 2f 0a | 58 49 4d 50 4f 52 54 09 |ot.X */.|XIMPORT.|
|00005400| 69 6e 74 09 6d 61 6c 6c | 6f 63 5f 65 78 61 6d 69 |int.mall|oc_exami|
|00005410| 6e 65 28 63 68 61 72 20 | 2a 20 70 6e 74 2c 20 75 |ne(char |* pnt, u|
|00005420| 6e 73 69 67 6e 65 64 20 | 69 6e 74 20 2a 20 73 69 |nsigned |int * si|
|00005430| 7a 65 2c 0a 58 09 09 09 | 20 20 20 20 20 20 20 63 |ze,.X...| c|
|00005440| 68 61 72 20 2a 2a 20 66 | 69 6c 65 2c 20 75 6e 73 |har ** f|ile, uns|
|00005450| 69 67 6e 65 64 20 69 6e | 74 20 2a 20 6c 69 6e 65 |igned in|t * line|
|00005460| 29 3b 0a 58 0a 58 2f 2a | 0a 58 20 2a 20 6d 61 6c |);.X.X/*|.X * mal|
|00005470| 6c 6f 63 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 73 |loc vers|ion of s|
|00005480| 74 72 65 72 72 6f 72 20 | 74 6f 20 72 65 74 75 72 |trerror |to retur|
|00005490| 6e 20 74 68 65 20 73 74 | 72 69 6e 67 20 76 65 72 |n the st|ring ver|
|000054a0| 73 69 6f 6e 20 6f 66 20 | 45 52 52 4e 55 4d 0a 58 |sion of |ERRNUM.X|
|000054b0| 20 2a 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 73 | * retur|ns the s|
|000054c0| 74 72 69 6e 67 20 66 6f | 72 20 4d 41 4c 4c 4f 43 |tring fo|r MALLOC|
|000054d0| 5f 42 41 44 5f 45 52 52 | 4e 4f 20 69 66 20 45 52 |_BAD_ERR|NO if ER|
|000054e0| 52 4e 55 4d 20 69 73 20 | 6f 75 74 2d 6f 66 2d 72 |RNUM is |out-of-r|
|000054f0| 61 6e 67 65 2e 0a 58 20 | 2a 2f 0a 58 49 4d 50 4f |ange..X |*/.XIMPO|
|00005500| 52 54 09 63 68 61 72 09 | 2a 6d 61 6c 6c 6f 63 5f |RT.char.|*malloc_|
|00005510| 73 74 72 65 72 72 6f 72 | 28 69 6e 74 20 65 72 72 |strerror|(int err|
|00005520| 6e 75 6d 29 3b 0a 58 0a | 58 2f 2a 3c 3c 3c 3c 3c |num);.X.|X/*<<<<<|
|00005530| 3c 3c 3c 3c 3c 20 20 20 | 54 68 69 73 20 69 73 20 |<<<<< |This is |
|00005540| 65 6e 64 20 6f 66 20 74 | 68 65 20 61 75 74 6f 2d |end of t|he auto-|
|00005550| 67 65 6e 65 72 61 74 65 | 64 20 6f 75 74 70 75 74 |generate|d output|
|00005560| 20 66 72 6f 6d 20 66 69 | 6c 6c 70 72 6f 74 6f 2e | from fi|llproto.|
|00005570| 20 2a 2f 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 61 6c | */.X.X/|*.X * al|
|00005580| 6c 6f 63 20 6d 61 63 72 | 6f 73 20 74 6f 20 70 72 |loc macr|os to pr|
|00005590| 6f 76 69 64 65 20 66 6f | 72 20 6d 65 6d 6f 72 79 |ovide fo|r memory|
|000055a0| 20 46 49 4c 45 2f 4c 49 | 4e 45 20 64 65 62 75 67 | FILE/LI|NE debug|
|000055b0| 67 69 6e 67 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ging inf|ormation|
|000055c0| 2e 0a 58 20 2a 2f 0a 58 | 0a 58 23 69 66 6e 64 65 |..X */.X|.X#ifnde|
|000055d0| 66 20 4d 41 4c 4c 4f 43 | 5f 44 45 42 55 47 5f 44 |f MALLOC|_DEBUG_D|
|000055e0| 49 53 41 42 4c 45 0a 58 | 0a 58 23 64 65 66 69 6e |ISABLE.X|.X#defin|
|000055f0| 65 20 6d 61 6c 6c 6f 63 | 28 73 69 7a 65 29 20 5c |e malloc|(size) \|
|00005600| 0a 58 20 20 5f 6d 61 6c | 6c 6f 63 5f 6c 65 61 70 |.X _mal|loc_leap|
|00005610| 28 5f 5f 46 49 4c 45 5f | 5f 2c 20 5f 5f 4c 49 4e |(__FILE_|_, __LIN|
|00005620| 45 5f 5f 2c 20 73 69 7a | 65 29 0a 58 23 64 65 66 |E__, siz|e).X#def|
|00005630| 69 6e 65 20 63 61 6c 6c | 6f 63 28 63 6f 75 6e 74 |ine call|oc(count|
|00005640| 2c 20 73 69 7a 65 29 20 | 5c 0a 58 20 20 5f 63 61 |, size) |\.X _ca|
|00005650| 6c 6c 6f 63 5f 6c 65 61 | 70 28 5f 5f 46 49 4c 45 |lloc_lea|p(__FILE|
|00005660| 5f 5f 2c 20 5f 5f 4c 49 | 4e 45 5f 5f 2c 20 63 6f |__, __LI|NE__, co|
|00005670| 75 6e 74 2c 20 73 69 7a | 65 29 0a 58 23 64 65 66 |unt, siz|e).X#def|
|00005680| 69 6e 65 20 72 65 61 6c | 6c 6f 63 28 70 74 72 2c |ine real|loc(ptr,|
|00005690| 20 73 69 7a 65 29 20 5c | 0a 58 20 20 5f 72 65 61 | size) \|.X _rea|
|000056a0| 6c 6c 6f 63 5f 6c 65 61 | 70 28 5f 5f 46 49 4c 45 |lloc_lea|p(__FILE|
|000056b0| 5f 5f 2c 20 5f 5f 4c 49 | 4e 45 5f 5f 2c 20 70 74 |__, __LI|NE__, pt|
|000056c0| 72 2c 20 73 69 7a 65 29 | 0a 58 23 64 65 66 69 6e |r, size)|.X#defin|
|000056d0| 65 20 66 72 65 65 28 70 | 74 72 29 20 5c 0a 58 20 |e free(p|tr) \.X |
|000056e0| 20 5f 66 72 65 65 5f 6c | 65 61 70 28 5f 5f 46 49 | _free_l|eap(__FI|
|000056f0| 4c 45 5f 5f 2c 20 5f 5f | 4c 49 4e 45 5f 5f 2c 20 |LE__, __|LINE__, |
|00005700| 70 74 72 29 0a 58 0a 58 | 23 69 66 64 65 66 20 4d |ptr).X.X|#ifdef M|
|00005710| 41 4c 4c 4f 43 5f 46 55 | 4e 43 5f 43 48 45 43 4b |ALLOC_FU|NC_CHECK|
|00005720| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 64 6f 20 64 65 |.X.X/*.X| * do de|
|00005730| 62 75 67 67 69 6e 67 20 | 6f 6e 20 74 68 65 20 66 |bugging |on the f|
|00005740| 6f 6c 6c 6f 77 69 6e 67 | 20 66 75 6e 63 74 69 6f |ollowing| functio|
|00005750| 6e 73 2e 20 20 74 68 69 | 73 20 6d 61 79 20 63 61 |ns. thi|s may ca|
|00005760| 75 73 65 20 63 6f 6d 70 | 69 6c 61 74 69 6f 6e 20 |use comp|ilation |
|00005770| 6f 72 0a 58 20 2a 20 6f | 74 68 65 72 20 70 72 6f |or.X * o|ther pro|
|00005780| 62 6c 65 6d 73 20 64 65 | 70 65 6e 64 69 6e 67 20 |blems de|pending |
|00005790| 6f 6e 20 79 6f 75 72 20 | 61 72 63 68 69 74 65 63 |on your |architec|
|000057a0| 74 75 72 65 2c 20 68 65 | 6e 63 65 20 74 68 65 20 |ture, he|nce the |
|000057b0| 6e 65 65 64 20 66 6f 72 | 20 74 68 65 0a 58 20 2a |need for| the.X *|
|000057c0| 20 4d 41 4c 4c 4f 43 5f | 53 54 52 49 4e 47 5f 44 | MALLOC_|STRING_D|
|000057d0| 49 53 41 42 4c 45 20 64 | 65 66 69 6e 65 2e 0a 58 |ISABLE d|efine..X|
|000057e0| 20 2a 2f 0a 58 23 64 65 | 66 69 6e 65 20 62 63 6d | */.X#de|fine bcm|
|000057f0| 70 28 62 31 2c 20 62 32 | 2c 20 6c 65 6e 29 09 09 |p(b1, b2|, len)..|
|00005800| 5f 6d 61 6c 6c 6f 63 5f | 62 63 6d 70 28 62 31 2c |_malloc_|bcmp(b1,|
|00005810| 20 62 32 2c 20 6c 65 6e | 29 0a 58 23 64 65 66 69 | b2, len|).X#defi|
|00005820| 6e 65 20 62 63 6f 70 79 | 28 66 72 6f 6d 2c 20 74 |ne bcopy|(from, t|
|00005830| 6f 2c 20 6c 65 6e 29 09 | 09 5f 6d 61 6c 6c 6f 63 |o, len).|._malloc|
|00005840| 5f 62 63 6f 70 79 28 66 | 72 6f 6d 2c 20 74 6f 2c |_bcopy(f|rom, to,|
|00005850| 20 6c 65 6e 29 0a 58 0a | 58 23 64 65 66 69 6e 65 | len).X.|X#define|
|00005860| 20 6d 65 6d 63 6d 70 28 | 62 31 2c 20 62 32 2c 20 | memcmp(|b1, b2, |
|00005870| 6c 65 6e 29 09 09 5f 6d | 61 6c 6c 6f 63 5f 6d 65 |len).._m|alloc_me|
|00005880| 6d 63 6d 70 28 62 31 2c | 20 62 32 2c 20 6c 65 6e |mcmp(b1,| b2, len|
|00005890| 29 0a 58 23 64 65 66 69 | 6e 65 20 6d 65 6d 63 70 |).X#defi|ne memcp|
|000058a0| 79 28 74 6f 2c 20 66 72 | 6f 6d 2c 20 6c 65 6e 29 |y(to, fr|om, len)|
|000058b0| 09 09 5f 6d 61 6c 6c 6f | 63 5f 6d 65 6d 63 70 79 |.._mallo|c_memcpy|
|000058c0| 28 74 6f 2c 20 66 72 6f | 6d 2c 20 6c 65 6e 29 0a |(to, fro|m, len).|
|000058d0| 58 23 64 65 66 69 6e 65 | 20 6d 65 6d 73 65 74 28 |X#define| memset(|
|000058e0| 62 75 66 2c 20 63 68 2c | 20 6c 65 6e 29 09 09 5f |buf, ch,| len).._|
|000058f0| 6d 61 6c 6c 6f 63 5f 6d | 65 6d 73 65 74 28 62 75 |malloc_m|emset(bu|
|00005900| 66 2c 20 63 68 2c 20 6c | 65 6e 29 0a 58 0a 58 23 |f, ch, l|en).X.X#|
|00005910| 64 65 66 69 6e 65 20 69 | 6e 64 65 78 28 73 74 72 |define i|ndex(str|
|00005920| 2c 20 63 68 29 09 09 09 | 5f 6d 61 6c 6c 6f 63 5f |, ch)...|_malloc_|
|00005930| 69 6e 64 65 78 28 73 74 | 72 2c 20 63 68 29 0a 58 |index(st|r, ch).X|
|00005940| 23 64 65 66 69 6e 65 20 | 72 69 6e 64 65 78 28 73 |#define |rindex(s|
|00005950| 74 72 2c 20 63 68 29 09 | 09 09 5f 6d 61 6c 6c 6f |tr, ch).|.._mallo|
|00005960| 63 5f 72 69 6e 64 65 78 | 28 73 74 72 2c 20 63 68 |c_rindex|(str, ch|
|00005970| 29 0a 58 0a 58 23 64 65 | 66 69 6e 65 20 73 74 72 |).X.X#de|fine str|
|00005980| 63 61 74 28 74 6f 2c 20 | 66 72 6f 6d 29 09 09 5f |cat(to, |from).._|
|00005990| 6d 61 6c 6c 6f 63 5f 73 | 74 72 63 61 74 28 74 6f |malloc_s|trcat(to|
|000059a0| 2c 20 66 72 6f 6d 29 0a | 58 23 64 65 66 69 6e 65 |, from).|X#define|
|000059b0| 20 73 74 72 63 6d 70 28 | 73 31 2c 20 73 32 29 09 | strcmp(|s1, s2).|
|000059c0| 09 09 5f 6d 61 6c 6c 6f | 63 5f 73 74 72 63 6d 70 |.._mallo|c_strcmp|
|000059d0| 28 73 31 2c 20 73 32 29 | 0a 58 23 64 65 66 69 6e |(s1, s2)|.X#defin|
|000059e0| 65 20 73 74 72 6c 65 6e | 28 73 74 72 29 09 09 09 |e strlen|(str)...|
|000059f0| 5f 6d 61 6c 6c 6f 63 5f | 73 74 72 6c 65 6e 28 73 |_malloc_|strlen(s|
|00005a00| 74 72 29 0a 58 23 64 65 | 66 69 6e 65 20 73 74 72 |tr).X#de|fine str|
|00005a10| 74 6f 6b 28 73 74 72 2c | 20 73 65 70 29 09 09 5f |tok(str,| sep).._|
|00005a20| 6d 61 6c 6c 6f 63 5f 73 | 74 72 74 6f 6b 28 73 74 |malloc_s|trtok(st|
|00005a30| 72 2c 20 73 65 70 29 0a | 58 0a 58 23 64 65 66 69 |r, sep).|X.X#defi|
|00005a40| 6e 65 20 62 7a 65 72 6f | 28 62 75 66 2c 20 6c 65 |ne bzero|(buf, le|
|00005a50| 6e 29 09 09 09 5f 6d 61 | 6c 6c 6f 63 5f 62 7a 65 |n)..._ma|lloc_bze|
|00005a60| 72 6f 28 62 75 66 2c 20 | 6c 65 6e 29 0a 58 0a 58 |ro(buf, |len).X.X|
|00005a70| 23 64 65 66 69 6e 65 20 | 6d 65 6d 63 63 70 79 28 |#define |memccpy(|
|00005a80| 73 31 2c 20 73 32 2c 20 | 63 68 2c 20 6c 65 6e 29 |s1, s2, |ch, len)|
|00005a90| 09 5f 6d 61 6c 6c 6f 63 | 5f 6d 65 6d 63 63 70 79 |._malloc|_memccpy|
|00005aa0| 28 73 31 2c 20 73 32 2c | 20 63 68 2c 20 6c 65 6e |(s1, s2,| ch, len|
|00005ab0| 29 0a 58 23 64 65 66 69 | 6e 65 20 6d 65 6d 63 68 |).X#defi|ne memch|
|00005ac0| 72 28 73 31 2c 20 63 68 | 2c 20 6c 65 6e 29 09 09 |r(s1, ch|, len)..|
|00005ad0| 5f 6d 61 6c 6c 6f 63 5f | 6d 65 6d 63 68 72 28 73 |_malloc_|memchr(s|
|00005ae0| 31 2c 20 63 68 2c 20 6c | 65 6e 29 0a 58 0a 58 23 |1, ch, l|en).X.X#|
|00005af0| 64 65 66 69 6e 65 20 73 | 74 72 63 68 72 28 73 74 |define s|trchr(st|
|00005b00| 72 2c 20 63 68 29 09 09 | 09 5f 6d 61 6c 6c 6f 63 |r, ch)..|._malloc|
|00005b10| 5f 73 74 72 63 68 72 28 | 73 74 72 2c 20 63 68 29 |_strchr(|str, ch)|
|00005b20| 0a 58 23 64 65 66 69 6e | 65 20 73 74 72 72 63 68 |.X#defin|e strrch|
|00005b30| 72 28 73 74 72 2c 20 63 | 68 29 09 09 5f 6d 61 6c |r(str, c|h).._mal|
|00005b40| 6c 6f 63 5f 73 74 72 72 | 63 68 72 28 73 74 72 2c |loc_strr|chr(str,|
|00005b50| 20 63 68 29 0a 58 0a 58 | 23 64 65 66 69 6e 65 20 | ch).X.X|#define |
|00005b60| 73 74 72 63 70 79 28 74 | 6f 2c 20 66 72 6f 6d 29 |strcpy(t|o, from)|
|00005b70| 09 09 5f 6d 61 6c 6c 6f | 63 5f 73 74 72 63 70 79 |.._mallo|c_strcpy|
|00005b80| 28 74 6f 2c 20 66 72 6f | 6d 29 0a 58 23 64 65 66 |(to, fro|m).X#def|
|00005b90| 69 6e 65 20 73 74 72 6e | 63 70 79 28 74 6f 2c 20 |ine strn|cpy(to, |
|00005ba0| 66 72 6f 6d 2c 20 6c 65 | 6e 29 09 09 5f 6d 61 6c |from, le|n).._mal|
|00005bb0| 6c 6f 63 5f 73 74 72 6e | 63 70 79 28 74 6f 2c 20 |loc_strn|cpy(to, |
|00005bc0| 66 72 6f 6d 2c 20 6c 65 | 6e 29 0a 58 23 64 65 66 |from, le|n).X#def|
|00005bd0| 69 6e 65 20 73 74 72 63 | 61 73 65 63 6d 70 28 73 |ine strc|asecmp(s|
|00005be0| 31 2c 20 73 32 29 09 09 | 5f 6d 61 6c 6c 6f 63 5f |1, s2)..|_malloc_|
|00005bf0| 73 74 72 63 61 73 65 63 | 6d 70 28 73 31 2c 20 73 |strcasec|mp(s1, s|
|00005c00| 32 29 0a 58 23 64 65 66 | 69 6e 65 20 73 74 72 6e |2).X#def|ine strn|
|00005c10| 63 61 73 65 63 6d 70 28 | 73 31 2c 20 73 32 2c 20 |casecmp(|s1, s2, |
|00005c20| 6c 65 6e 29 09 5f 6d 61 | 6c 6c 6f 63 5f 73 74 72 |len)._ma|lloc_str|
|00005c30| 6e 63 61 73 65 63 6d 70 | 28 73 31 2c 20 73 32 2c |ncasecmp|(s1, s2,|
|00005c40| 20 6c 65 6e 29 0a 58 23 | 64 65 66 69 6e 65 20 73 | len).X#|define s|
|00005c50| 74 72 73 70 6e 28 73 74 | 72 2c 20 6c 69 73 74 29 |trspn(st|r, list)|
|00005c60| 09 09 5f 6d 61 6c 6c 6f | 63 5f 73 74 72 73 70 6e |.._mallo|c_strspn|
|00005c70| 28 73 74 72 2c 20 6c 69 | 73 74 29 0a 58 23 64 65 |(str, li|st).X#de|
|00005c80| 66 69 6e 65 20 73 74 72 | 63 73 70 6e 28 73 74 72 |fine str|cspn(str|
|00005c90| 2c 20 6c 69 73 74 29 09 | 09 5f 6d 61 6c 6c 6f 63 |, list).|._malloc|
|00005ca0| 5f 73 74 72 63 73 70 6e | 28 73 74 72 2c 20 6c 69 |_strcspn|(str, li|
|00005cb0| 73 74 29 0a 58 23 64 65 | 66 69 6e 65 20 73 74 72 |st).X#de|fine str|
|00005cc0| 6e 63 61 74 28 74 6f 2c | 20 66 72 6f 6d 2c 20 6c |ncat(to,| from, l|
|00005cd0| 65 6e 29 09 09 5f 6d 61 | 6c 6c 6f 63 5f 73 74 72 |en).._ma|lloc_str|
|00005ce0| 6e 63 61 74 28 74 6f 2c | 20 66 72 6f 6d 2c 20 6c |ncat(to,| from, l|
|00005cf0| 65 6e 29 0a 58 23 64 65 | 66 69 6e 65 20 73 74 72 |en).X#de|fine str|
|00005d00| 6e 63 6d 70 28 73 31 2c | 20 73 32 2c 20 6c 65 6e |ncmp(s1,| s2, len|
|00005d10| 29 09 09 5f 6d 61 6c 6c | 6f 63 5f 73 74 72 6e 63 |).._mall|oc_strnc|
|00005d20| 6d 70 28 73 31 2c 20 73 | 32 2c 20 6c 65 6e 29 0a |mp(s1, s|2, len).|
|00005d30| 58 23 64 65 66 69 6e 65 | 20 73 74 72 70 62 72 6b |X#define| strpbrk|
|00005d40| 28 73 74 72 2c 20 6c 69 | 73 74 29 09 09 5f 6d 61 |(str, li|st).._ma|
|00005d50| 6c 6c 6f 63 5f 73 74 72 | 70 62 72 6b 28 73 74 72 |lloc_str|pbrk(str|
|00005d60| 2c 20 6c 69 73 74 29 0a | 58 23 64 65 66 69 6e 65 |, list).|X#define|
|00005d70| 20 73 74 72 73 74 72 28 | 73 74 72 2c 20 70 61 74 | strstr(|str, pat|
|00005d80| 29 09 09 5f 6d 61 6c 6c | 6f 63 5f 73 74 72 73 74 |).._mall|oc_strst|
|00005d90| 72 28 73 74 72 2c 20 70 | 61 74 29 0a 58 0a 58 2f |r(str, p|at).X.X/|
|00005da0| 2a 0a 58 20 2a 20 66 65 | 65 6c 20 66 72 65 65 20 |*.X * fe|el free |
|00005db0| 74 6f 20 61 64 64 20 79 | 6f 75 72 20 66 61 76 6f |to add y|our favo|
|00005dc0| 72 69 74 65 20 66 75 6e | 63 74 69 6f 6e 73 20 68 |rite fun|ctions h|
|00005dd0| 65 72 65 20 61 6e 64 20 | 74 6f 20 6d 61 6c 6c 6f |ere and |to mallo|
|00005de0| 63 5f 73 74 72 2e 5b 63 | 68 5d 0a 58 20 2a 2f 0a |c_str.[c|h].X */.|
|00005df0| 58 0a 58 23 65 6e 64 69 | 66 20 2f 2a 20 4d 41 4c |X.X#endi|f /* MAL|
|00005e00| 4c 4f 43 5f 46 55 4e 43 | 5f 43 48 45 43 4b 20 2a |LOC_FUNC|_CHECK *|
|00005e10| 2f 0a 58 0a 58 2f 2a 0a | 58 20 2a 20 63 6f 70 69 |/.X.X/*.|X * copi|
|00005e20| 65 64 20 64 69 72 65 63 | 74 6c 79 20 66 72 6f 6d |ed direc|tly from|
|00005e30| 20 6d 61 6c 6c 6f 63 5f | 6c 70 2e 68 0a 58 20 2a | malloc_|lp.h.X *|
|00005e40| 2f 0a 58 0a 58 2f 2a 20 | 74 6f 20 69 6e 66 6f 72 |/.X.X/* |to infor|
|00005e50| 6d 20 74 68 65 20 6d 61 | 6c 6c 6f 63 2d 64 65 62 |m the ma|lloc-deb|
|00005e60| 75 67 20 6c 69 62 72 61 | 72 79 20 66 72 6f 6d 20 |ug libra|ry from |
|00005e70| 77 68 69 63 68 20 66 69 | 6c 65 20 74 68 65 20 63 |which fi|le the c|
|00005e80| 61 6c 6c 20 63 6f 6d 65 | 73 20 66 72 6f 6d 20 2a |all come|s from *|
|00005e90| 2f 0a 58 49 4d 50 4f 52 | 54 09 63 68 61 72 09 09 |/.XIMPOR|T.char..|
|00005ea0| 2a 5f 6d 61 6c 6c 6f 63 | 5f 66 69 6c 65 3b 0a 58 |*_malloc|_file;.X|
|00005eb0| 0a 58 2f 2a 20 74 6f 20 | 69 6e 66 6f 72 6d 20 74 |.X/* to |inform t|
|00005ec0| 68 65 20 6c 69 62 72 61 | 72 79 20 66 72 6f 6d 20 |he libra|ry from |
|00005ed0| 77 68 69 63 68 20 6c 69 | 6e 65 2d 6e 75 6d 62 65 |which li|ne-numbe|
|00005ee0| 72 20 74 68 65 20 63 61 | 6c 6c 20 63 6f 6d 65 73 |r the ca|ll comes|
|00005ef0| 20 66 72 6f 6d 20 2a 2f | 0a 58 49 4d 50 4f 52 54 | from */|.XIMPORT|
|00005f00| 09 75 6e 73 69 67 6e 65 | 64 20 69 6e 74 09 5f 6d |.unsigne|d int._m|
|00005f10| 61 6c 6c 6f 63 5f 6c 69 | 6e 65 3b 0a 58 0a 58 2f |alloc_li|ne;.X.X/|
|00005f20| 2a 0a 58 20 2a 20 6c 65 | 61 70 20 72 6f 75 74 69 |*.X * le|ap routi|
|00005f30| 6e 65 20 74 6f 20 63 61 | 6c 6c 6f 63 0a 58 20 2a |ne to ca|lloc.X *|
|00005f40| 2f 0a 58 49 4d 50 4f 52 | 54 09 63 68 61 72 09 2a |/.XIMPOR|T.char.*|
|00005f50| 5f 63 61 6c 6c 6f 63 5f | 6c 65 61 70 28 63 6f 6e |_calloc_|leap(con|
|00005f60| 73 74 20 63 68 61 72 20 | 2a 20 66 69 6c 65 2c 20 |st char |* file, |
|00005f70| 63 6f 6e 73 74 20 69 6e | 74 20 6c 69 6e 65 2c 0a |const in|t line,.|
|00005f80| 58 09 09 09 20 20 20 20 | 20 20 75 6e 73 69 67 6e |X... | unsign|
|00005f90| 65 64 20 69 6e 74 20 65 | 6c 65 6e 2c 20 75 6e 73 |ed int e|len, uns|
|00005fa0| 69 67 6e 65 64 20 69 6e | 74 20 73 69 7a 65 29 3b |igned in|t size);|
|00005fb0| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 6c 65 61 70 20 |.X.X/*.X| * leap |
|00005fc0| 72 6f 75 74 69 6e 65 20 | 74 6f 20 66 72 65 65 0a |routine |to free.|
|00005fd0| 58 20 2a 2f 0a 58 49 4d | 50 4f 52 54 09 69 6e 74 |X */.XIM|PORT.int|
|00005fe0| 09 5f 66 72 65 65 5f 6c | 65 61 70 28 63 6f 6e 73 |._free_l|eap(cons|
|00005ff0| 74 20 63 68 61 72 20 2a | 20 66 69 6c 65 2c 20 63 |t char *| file, c|
|00006000| 6f 6e 73 74 20 69 6e 74 | 20 6c 69 6e 65 2c 20 63 |onst int| line, c|
|00006010| 68 61 72 20 2a 20 70 6e | 74 29 3b 0a 58 0a 58 2f |har * pn|t);.X.X/|
|00006020| 2a 0a 58 20 2a 20 6c 65 | 61 70 20 72 6f 75 74 69 |*.X * le|ap routi|
|00006030| 6e 65 20 74 6f 20 6d 61 | 6c 6c 6f 63 0a 58 20 2a |ne to ma|lloc.X *|
|00006040| 2f 0a 58 49 4d 50 4f 52 | 54 09 63 68 61 72 09 2a |/.XIMPOR|T.char.*|
|00006050| 5f 6d 61 6c 6c 6f 63 5f | 6c 65 61 70 28 63 6f 6e |_malloc_|leap(con|
|00006060| 73 74 20 63 68 61 72 20 | 2a 20 66 69 6c 65 2c 20 |st char |* file, |
|00006070| 63 6f 6e 73 74 20 69 6e | 74 20 6c 69 6e 65 2c 0a |const in|t line,.|
|00006080| 58 09 09 09 20 20 20 20 | 20 20 75 6e 73 69 67 6e |X... | unsign|
|00006090| 65 64 20 69 6e 74 20 73 | 69 7a 65 29 3b 0a 58 0a |ed int s|ize);.X.|
|000060a0| 58 2f 2a 0a 58 20 2a 20 | 6c 65 61 70 20 72 6f 75 |X/*.X * |leap rou|
|000060b0| 74 69 6e 65 20 74 6f 20 | 72 65 61 6c 6c 6f 63 0a |tine to |realloc.|
|000060c0| 58 20 2a 2f 0a 58 49 4d | 50 4f 52 54 09 63 68 61 |X */.XIM|PORT.cha|
|000060d0| 72 09 2a 5f 72 65 61 6c | 6c 6f 63 5f 6c 65 61 70 |r.*_real|loc_leap|
|000060e0| 28 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 20 66 69 |(const c|har * fi|
|000060f0| 6c 65 2c 20 63 6f 6e 73 | 74 20 69 6e 74 20 6c 69 |le, cons|t int li|
|00006100| 6e 65 2c 20 63 68 61 72 | 20 2a 20 6f 6c 64 70 2c |ne, char| * oldp,|
|00006110| 0a 58 09 09 09 20 20 20 | 20 20 20 20 75 6e 73 69 |.X... | unsi|
|00006120| 67 6e 65 64 20 69 6e 74 | 20 6e 65 77 5f 73 69 7a |gned int| new_siz|
|00006130| 65 29 3b 0a 58 0a 58 23 | 65 6e 64 69 66 20 2f 2a |e);.X.X#|endif /*|
|00006140| 20 4d 41 4c 4c 4f 43 5f | 44 45 42 55 47 5f 44 49 | MALLOC_|DEBUG_DI|
|00006150| 53 41 42 4c 45 20 2a 2f | 0a 58 0a 58 23 65 6e 64 |SABLE */|.X.X#end|
|00006160| 69 66 20 2f 2a 20 21 20 | 5f 5f 4d 41 4c 4c 4f 43 |if /* ! |__MALLOC|
|00006170| 5f 48 5f 5f 20 2a 2f 0a | 45 4e 44 5f 4f 46 5f 46 |_H__ */.|END_OF_F|
|00006180| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 39 30 34 36 |ILE.if t|est 9046|
|00006190| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 6d 61 | -ne `wc| -c <'ma|
|000061a0| 6c 6c 6f 63 2e 68 27 60 | 3b 20 74 68 65 6e 0a 20 |lloc.h'`|; then. |
|000061b0| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|000061c0| 27 6d 61 6c 6c 6f 63 2e | 68 27 5c 22 20 75 6e 70 |'malloc.|h'\" unp|
|000061d0| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|000061e0| 20 73 69 7a 65 21 0a 66 | 69 0a 23 20 65 6e 64 20 | size!.f|i.# end |
|000061f0| 6f 66 20 27 6d 61 6c 6c | 6f 63 2e 68 27 0a 66 69 |of 'mall|oc.h'.fi|
|00006200| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 6d 61 6c |.if test| -f 'mal|
|00006210| 6c 6f 63 5f 64 62 67 2e | 63 27 20 2d 61 20 22 24 |loc_dbg.|c' -a "$|
|00006220| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00006230| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00006240| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00006250| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00006260| 20 5c 22 27 6d 61 6c 6c | 6f 63 5f 64 62 67 2e 63 | \"'mall|oc_dbg.c|
|00006270| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00006280| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00006290| 22 27 6d 61 6c 6c 6f 63 | 5f 64 62 67 2e 63 27 5c |"'malloc|_dbg.c'\|
|000062a0| 22 20 5c 28 31 33 31 37 | 30 20 63 68 61 72 61 63 |" \(1317|0 charac|
|000062b0| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|000062c0| 2f 2f 22 20 3e 27 6d 61 | 6c 6c 6f 63 5f 64 62 67 |//" >'ma|lloc_dbg|
|000062d0| 2e 63 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |.c' <<'E|ND_OF_FI|
|000062e0| 4c 45 27 0a 58 2f 2a 0a | 58 20 2a 20 70 72 6f 67 |LE'.X/*.|X * prog|
|000062f0| 72 61 6d 20 74 68 61 74 | 20 68 61 6e 64 6c 65 73 |ram that| handles|
|00006300| 20 74 68 65 20 6d 61 6c | 6c 6f 63 20 64 65 62 75 | the mal|loc debu|
|00006310| 67 20 76 61 72 69 61 62 | 6c 65 73 2e 0a 58 20 2a |g variab|les..X *|
|00006320| 0a 58 20 2a 20 43 6f 70 | 79 72 69 67 68 74 20 31 |.X * Cop|yright 1|
|00006330| 39 39 32 20 62 79 20 47 | 72 61 79 20 57 61 74 73 |992 by G|ray Wats|
|00006340| 6f 6e 20 61 6e 64 20 74 | 68 65 20 41 6e 74 61 69 |on and t|he Antai|
|00006350| 72 65 20 43 6f 72 70 6f | 72 61 74 69 6f 6e 0a 58 |re Corpo|ration.X|
|00006360| 20 2a 0a 58 20 2a 20 54 | 68 69 73 20 66 69 6c 65 | *.X * T|his file|
|00006370| 20 69 73 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 | is part| of the |
|00006380| 6d 61 6c 6c 6f 63 2d 64 | 65 62 75 67 20 70 61 63 |malloc-d|ebug pac|
|00006390| 6b 61 67 65 2e 0a 58 20 | 2a 0a 58 20 2a 20 54 68 |kage..X |*.X * Th|
|000063a0| 69 73 20 6c 69 62 72 61 | 72 79 20 69 73 20 66 72 |is libra|ry is fr|
|000063b0| 65 65 20 73 6f 66 74 77 | 61 72 65 3b 20 79 6f 75 |ee softw|are; you|
|000063c0| 20 63 61 6e 20 72 65 64 | 69 73 74 72 69 62 75 74 | can red|istribut|
|000063d0| 65 20 69 74 20 61 6e 64 | 2f 6f 72 0a 58 20 2a 20 |e it and|/or.X * |
|000063e0| 6d 6f 64 69 66 79 20 69 | 74 20 75 6e 64 65 72 20 |modify i|t under |
|000063f0| 74 68 65 20 74 65 72 6d | 73 20 6f 66 20 74 68 65 |the term|s of the|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.