kduma-c.html 140 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
  2. <html>
  3. <head>
  4. <title>C:\projects\duma\kduma\kduma.c</title>
  5. <link rel="stylesheet" type="text/css" href="../styles/main.css" />
  6. <script language="JavaScript" src="../javascript/main.js"></script>
  7. </head>
  8. <body class="UnframedPage" onLoad="NDOnLoad()">
  9. <script language="JavaScript">
  10. <!--
  11. if (browserType) {
  12. document.write("<div class=" + browserType + ">");
  13. if (browserVer) {
  14. document.write("<div class=" + browserVer + ">");
  15. }
  16. } // -->
  17. </script>
  18. <!-- Generated by Natural Docs, version 1.35 -->
  19. <!-- http://www.naturaldocs.org -->
  20. <!-- saved from url=(0026)http://www.naturaldocs.org -->
  21. <table border="0" cellspacing="0" cellpadding="0" width="100%">
  22. <tr>
  23. <td class="MenuSection" valign="top">
  24. <!--START_ND_MENU-->
  25. <div class="MEntry">
  26. <div class="MFile"><a href="README-txt.html">00README</a></div>
  27. </div>
  28. <div class="MEntry">
  29. <div class="MFile">
  30. <a href="duma_config-h.html">duma_config.h</a>
  31. </div>
  32. </div>
  33. <div class="MEntry">
  34. <div class="MFile" id="MSelected">kduma.c</div>
  35. </div>
  36. <div class="MEntry">
  37. <div class="MFile"><a href="kduma-h.html">kduma.h</a></div>
  38. </div>
  39. <div class="MEntry">
  40. <div class="MFile"><a href="log-h.html">log.h</a></div>
  41. </div>
  42. <div class="MEntry">
  43. <div class="MFile"><a href="paging-h.html">paging.h</a></div>
  44. </div>
  45. <div class="MEntry">
  46. <div class="MGroup">
  47. <a href="javascript:ToggleMenu('MGroupContent1')">Index</a>
  48. <div class="MGroupContent" id="MGroupContent1">
  49. <div class="MEntry">
  50. <div class="MIndex">
  51. <a href="../index/General.html">Everything</a>
  52. </div>
  53. </div>
  54. <div class="MEntry">
  55. <div class="MIndex">
  56. <a href="../index/Classes.html">Classes</a>
  57. </div>
  58. </div>
  59. <div class="MEntry">
  60. <div class="MIndex">
  61. <a href="../index/Files.html">Files</a>
  62. </div>
  63. </div>
  64. <div class="MEntry">
  65. <div class="MIndex">
  66. <a href="../index/Functions.html">Functions</a>
  67. </div>
  68. </div>
  69. <div class="MEntry">
  70. <div class="MIndex">
  71. <a href="../index/Types.html">Types</a>
  72. </div>
  73. </div>
  74. <div class="MEntry">
  75. <div class="MIndex">
  76. <a href="../index/Variables.html">Variables</a>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <!--END_ND_MENU-->
  83. </td>
  84. <td class="ContentSection" valign="top">
  85. <div class="CFile" id="MainTopic">
  86. <div class="CTopic">
  87. <h1 class="CTitle"><a name="kduma.c"></a>kduma.c</h1>
  88. <div class="CBody">
  89. <!--START_ND_SUMMARY-->
  90. <div class="Summary">
  91. <div class="STitle">Summary</div>
  92. <div class="SBorder">
  93. <table
  94. border="0"
  95. cellspacing="0"
  96. cellpadding="0"
  97. class="STable"
  98. >
  99. <tr>
  100. <td class="SEntrySize">
  101. <div class="SMain">
  102. <div class="SEntry">
  103. <a href="#kduma.c">kduma.c</a>
  104. </div>
  105. </div>
  106. </td>
  107. <td class="SDescriptionSize">
  108. <div class="SMain">
  109. <div class="SDescription"></div>
  110. </div>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td>
  115. <div class="SGroup">
  116. <div class="SEntry">
  117. <a href="#Variables">Variables</a>
  118. </div>
  119. </div>
  120. </td>
  121. <td>
  122. <div class="SGroup">
  123. <div class="SDescription"></div>
  124. </div>
  125. </td>
  126. </tr>
  127. <tr class="SMarked">
  128. <td>
  129. <div class="SVariable">
  130. <div class="SEntry">
  131. <div class="SIndent1">
  132. <a
  133. href="#version"
  134. id="link1"
  135. onMouseOver="ShowTip(event, 'tt1', 'link1')"
  136. onMouseOut="HideTip('tt1')"
  137. >version</a
  138. >
  139. </div>
  140. </div>
  141. </div>
  142. </td>
  143. <td>
  144. <div class="SVariable">
  145. <div class="SDescription">
  146. <div class="SIndent1">KDUMA version string</div>
  147. </div>
  148. </div>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td>
  153. <div class="SVariable">
  154. <div class="SEntry">
  155. <div class="SIndent1">
  156. <a href="#MEMORY_CREATION_SIZE"
  157. >MEMORY_CREATION_SIZE</a
  158. >
  159. </div>
  160. </div>
  161. </div>
  162. </td>
  163. <td>
  164. <div class="SVariable">
  165. <div class="SDescription">
  166. <div class="SIndent1">
  167. MEMORY_CREATION_SIZE is the amount of memory to
  168. get from the operating system at one time.
  169. </div>
  170. </div>
  171. </div>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td>
  176. <div class="SGroup">
  177. <div class="SEntry">
  178. <a href="#Enumerations">Enumerations</a>
  179. </div>
  180. </div>
  181. </td>
  182. <td>
  183. <div class="SGroup">
  184. <div class="SDescription"></div>
  185. </div>
  186. </td>
  187. </tr>
  188. <tr class="SMarked">
  189. <td>
  190. <div class="SEnumeration">
  191. <div class="SEntry">
  192. <div class="SIndent1">
  193. <a href="#_DUMA_SlotState">_DUMA_SlotState</a>
  194. </div>
  195. </div>
  196. </div>
  197. </td>
  198. <td>
  199. <div class="SEnumeration">
  200. <div class="SDescription">
  201. <div class="SIndent1">
  202. State of slot values (empty, free, etc)
  203. </div>
  204. </div>
  205. </div>
  206. </td>
  207. </tr>
  208. <tr>
  209. <td>
  210. <div class="SEnumeration">
  211. <div class="SEntry">
  212. <div class="SIndent1">
  213. <a href="#_DUMA_Slot_FileSource"
  214. >_DUMA_Slot_FileSource</a
  215. >
  216. </div>
  217. </div>
  218. </div>
  219. </td>
  220. <td>
  221. <div class="SEnumeration">
  222. <div class="SDescription">
  223. <div class="SIndent1">
  224. Where did we get file info
  225. </div>
  226. </div>
  227. </div>
  228. </td>
  229. </tr>
  230. <tr class="SMarked">
  231. <td>
  232. <div class="SEnumeration">
  233. <div class="SEntry">
  234. <div class="SIndent1">
  235. <a href="#_DUMA_InitState">_DUMA_InitState</a>
  236. </div>
  237. </div>
  238. </div>
  239. </td>
  240. <td>
  241. <div class="SEnumeration">
  242. <div class="SDescription">
  243. <div class="SIndent1">
  244. Whats are initialization start
  245. </div>
  246. </div>
  247. </div>
  248. </td>
  249. </tr>
  250. <tr>
  251. <td>
  252. <div class="SEnumeration">
  253. <div class="SEntry">
  254. <div class="SIndent1">
  255. <a href="#_DUMA_MemRegion">_DUMA_MemRegion</a>
  256. </div>
  257. </div>
  258. </div>
  259. </td>
  260. <td>
  261. <div class="SEnumeration">
  262. <div class="SDescription">
  263. <div class="SIndent1">Memory region of slot.</div>
  264. </div>
  265. </div>
  266. </td>
  267. </tr>
  268. <tr>
  269. <td>
  270. <div class="SClass">
  271. <div class="SEntry">
  272. <a href="#_DUMA_Slot">_DUMA_Slot</a>
  273. </div>
  274. </div>
  275. </td>
  276. <td>
  277. <div class="SClass">
  278. <div class="SDescription">
  279. Struct Slot contains all of the information about
  280. a malloc buffer except for the contents of its
  281. memory.
  282. </div>
  283. </div>
  284. </td>
  285. </tr>
  286. <tr>
  287. <td>
  288. <div class="SGroup">
  289. <div class="SEntry">
  290. <div class="SIndent1">
  291. <a href="#_DUMA_Slot.Variables">Variables</a>
  292. </div>
  293. </div>
  294. </div>
  295. </td>
  296. <td>
  297. <div class="SGroup">
  298. <div class="SDescription">
  299. <div class="SIndent1"></div>
  300. </div>
  301. </div>
  302. </td>
  303. </tr>
  304. <tr class="SMarked">
  305. <td>
  306. <div class="SVariable">
  307. <div class="SEntry">
  308. <div class="SIndent2">
  309. <a
  310. href="#_DUMA_Slot.DUMA_ALIGNMENT"
  311. id="link2"
  312. onMouseOver="ShowTip(event, 'tt2', 'link2')"
  313. onMouseOut="HideTip('tt2')"
  314. >DUMA_ALIGNMENT</a
  315. >
  316. </div>
  317. </div>
  318. </div>
  319. </td>
  320. <td>
  321. <div class="SVariable">
  322. <div class="SDescription">
  323. <div class="SIndent2">
  324. DUMA_ALIGNMENT is a global variable used to
  325. control the default alignment of buffers
  326. returned by malloc(), calloc(), and realloc().
  327. </div>
  328. </div>
  329. </div>
  330. </td>
  331. </tr>
  332. <tr>
  333. <td>
  334. <div class="SVariable">
  335. <div class="SEntry">
  336. <div class="SIndent2">
  337. <a
  338. href="#_DUMA_Slot.DUMA_PROTECT_BELOW"
  339. id="link3"
  340. onMouseOver="ShowTip(event, 'tt3', 'link3')"
  341. onMouseOut="HideTip('tt3')"
  342. >DUMA_PROTECT_BELOW</a
  343. >
  344. </div>
  345. </div>
  346. </div>
  347. </td>
  348. <td>
  349. <div class="SVariable">
  350. <div class="SDescription">
  351. <div class="SIndent2">
  352. DUMA_PROTECT_BELOW is used to modify the
  353. behavior of the allocator.
  354. </div>
  355. </div>
  356. </div>
  357. </td>
  358. </tr>
  359. <tr class="SMarked">
  360. <td>
  361. <div class="SVariable">
  362. <div class="SEntry">
  363. <div class="SIndent2">
  364. <a
  365. href="#_DUMA_Slot.DUMA_FILL"
  366. id="link4"
  367. onMouseOver="ShowTip(event, 'tt4', 'link4')"
  368. onMouseOut="HideTip('tt4')"
  369. >DUMA_FILL</a
  370. >
  371. </div>
  372. </div>
  373. </div>
  374. </td>
  375. <td>
  376. <div class="SVariable">
  377. <div class="SDescription">
  378. <div class="SIndent2">
  379. DUMA_FILL is set to 0-255 if DUMA should fill
  380. all new allocated memory with the specified
  381. value.
  382. </div>
  383. </div>
  384. </div>
  385. </td>
  386. </tr>
  387. <tr>
  388. <td>
  389. <div class="SVariable">
  390. <div class="SEntry">
  391. <div class="SIndent2">
  392. <a
  393. href="#_DUMA_Slot.DUMA_SLACKFILL"
  394. id="link5"
  395. onMouseOver="ShowTip(event, 'tt5', 'link5')"
  396. onMouseOut="HideTip('tt5')"
  397. >DUMA_SLACKFILL</a
  398. >
  399. </div>
  400. </div>
  401. </div>
  402. </td>
  403. <td>
  404. <div class="SVariable">
  405. <div class="SDescription">
  406. <div class="SIndent2">
  407. DUMA_SLACKFILL is set to 0-255.
  408. </div>
  409. </div>
  410. </div>
  411. </td>
  412. </tr>
  413. <tr class="SMarked">
  414. <td>
  415. <div class="SVariable">
  416. <div class="SEntry">
  417. <div class="SIndent2">
  418. <a
  419. href="#_DUMA_Slot.DUMA_PROTECT_FREE"
  420. id="link6"
  421. onMouseOver="ShowTip(event, 'tt6', 'link6')"
  422. onMouseOut="HideTip('tt6')"
  423. >DUMA_PROTECT_FREE</a
  424. >
  425. </div>
  426. </div>
  427. </div>
  428. </td>
  429. <td>
  430. <div class="SVariable">
  431. <div class="SDescription">
  432. <div class="SIndent2">
  433. DUMA_PROTECT_FREE is used to control the
  434. disposition of memory that is released using
  435. free().
  436. </div>
  437. </div>
  438. </div>
  439. </td>
  440. </tr>
  441. <tr>
  442. <td>
  443. <div class="SVariable">
  444. <div class="SEntry">
  445. <div class="SIndent2">
  446. <a
  447. href="#_DUMA_Slot.DUMA_MAX_ALLOC"
  448. id="link7"
  449. onMouseOver="ShowTip(event, 'tt7', 'link7')"
  450. onMouseOut="HideTip('tt7')"
  451. >DUMA_MAX_ALLOC</a
  452. >
  453. </div>
  454. </div>
  455. </div>
  456. </td>
  457. <td>
  458. <div class="SVariable">
  459. <div class="SDescription">
  460. <div class="SIndent2">
  461. DUMA_MAX_ALLOC is used to control the maximum
  462. memory print of the program in total: When the
  463. sum of allocated and protected memory would
  464. exceed this value in kB, the protected memory is
  465. freed/deleted.
  466. </div>
  467. </div>
  468. </div>
  469. </td>
  470. </tr>
  471. <tr class="SMarked">
  472. <td>
  473. <div class="SVariable">
  474. <div class="SEntry">
  475. <div class="SIndent2">
  476. <a
  477. href="#_DUMA_Slot.DUMA_ALLOW_MALLOC_0"
  478. id="link8"
  479. onMouseOver="ShowTip(event, 'tt8', 'link8')"
  480. onMouseOut="HideTip('tt8')"
  481. >DUMA_ALLOW_MALLOC_0</a
  482. >
  483. </div>
  484. </div>
  485. </div>
  486. </td>
  487. <td>
  488. <div class="SVariable">
  489. <div class="SDescription">
  490. <div class="SIndent2">
  491. DUMA_ALLOW_MALLOC_0 is set if DUMA is to allow
  492. malloc(0).
  493. </div>
  494. </div>
  495. </div>
  496. </td>
  497. </tr>
  498. <tr>
  499. <td>
  500. <div class="SVariable">
  501. <div class="SEntry">
  502. <div class="SIndent2">
  503. <a
  504. href="#_DUMA_Slot.DUMA_MALLOC_FAILEXIT"
  505. id="link9"
  506. onMouseOver="ShowTip(event, 'tt9', 'link9')"
  507. onMouseOut="HideTip('tt9')"
  508. >DUMA_MALLOC_FAILEXIT</a
  509. >
  510. </div>
  511. </div>
  512. </div>
  513. </td>
  514. <td>
  515. <div class="SVariable">
  516. <div class="SDescription">
  517. <div class="SIndent2">
  518. DUMA_MALLOC_FAILEXIT controls the behaviour of
  519. DUMA when malloc() fails and would return NULL.
  520. </div>
  521. </div>
  522. </div>
  523. </td>
  524. </tr>
  525. <tr class="SMarked">
  526. <td>
  527. <div class="SVariable">
  528. <div class="SEntry">
  529. <div class="SIndent2">
  530. <a
  531. href="#_DUMA_Slot.DUMA_FREE_ACCESS"
  532. id="link10"
  533. onMouseOver="ShowTip(event, 'tt10', 'link10')"
  534. onMouseOut="HideTip('tt10')"
  535. >DUMA_FREE_ACCESS</a
  536. >
  537. </div>
  538. </div>
  539. </div>
  540. </td>
  541. <td>
  542. <div class="SVariable">
  543. <div class="SDescription">
  544. <div class="SIndent2">
  545. DUMA_FREE_ACCESS is set if DUMA is to write
  546. access memory before freeing it.
  547. </div>
  548. </div>
  549. </div>
  550. </td>
  551. </tr>
  552. <tr>
  553. <td>
  554. <div class="SVariable">
  555. <div class="SEntry">
  556. <div class="SIndent2">
  557. <a
  558. href="#_DUMA_Slot.DUMA_SHOW_ALLOC"
  559. id="link11"
  560. onMouseOver="ShowTip(event, 'tt11', 'link11')"
  561. onMouseOut="HideTip('tt11')"
  562. >DUMA_SHOW_ALLOC</a
  563. >
  564. </div>
  565. </div>
  566. </div>
  567. </td>
  568. <td>
  569. <div class="SVariable">
  570. <div class="SDescription">
  571. <div class="SIndent2">
  572. DUMA_SHOW_ALLOC is set if DUMA is to print all
  573. allocations and deallocations to the console.
  574. </div>
  575. </div>
  576. </div>
  577. </td>
  578. </tr>
  579. <tr class="SMarked">
  580. <td>
  581. <div class="SVariable">
  582. <div class="SEntry">
  583. <div class="SIndent2">
  584. <a
  585. href="#_DUMA_Slot._duma_allocList"
  586. id="link12"
  587. onMouseOver="ShowTip(event, 'tt12', 'link12')"
  588. onMouseOut="HideTip('tt12')"
  589. >_duma_allocList</a
  590. >
  591. </div>
  592. </div>
  593. </div>
  594. </td>
  595. <td>
  596. <div class="SVariable">
  597. <div class="SDescription">
  598. <div class="SIndent2">
  599. _DUMA_allocList points to the array of slot
  600. structures used to manage the malloc arena.
  601. </div>
  602. </div>
  603. </div>
  604. </td>
  605. </tr>
  606. <tr>
  607. <td>
  608. <div class="SVariable">
  609. <div class="SEntry">
  610. <div class="SIndent2">
  611. <a
  612. href="#_DUMA_Slot._duma_allocListSize"
  613. id="link13"
  614. onMouseOver="ShowTip(event, 'tt13', 'link13')"
  615. onMouseOut="HideTip('tt13')"
  616. >_duma_allocListSize</a
  617. >
  618. </div>
  619. </div>
  620. </div>
  621. </td>
  622. <td>
  623. <div class="SVariable">
  624. <div class="SDescription">
  625. <div class="SIndent2">
  626. _duma_allocListSize is the size of the
  627. allocation list.
  628. </div>
  629. </div>
  630. </div>
  631. </td>
  632. </tr>
  633. <tr class="SMarked">
  634. <td>
  635. <div class="SVariable">
  636. <div class="SEntry">
  637. <div class="SIndent2">
  638. <a
  639. href="#_DUMA_Slot.slotCount"
  640. id="link14"
  641. onMouseOver="ShowTip(event, 'tt14', 'link14')"
  642. onMouseOut="HideTip('tt14')"
  643. >slotCount</a
  644. >
  645. </div>
  646. </div>
  647. </div>
  648. </td>
  649. <td>
  650. <div class="SVariable">
  651. <div class="SDescription">
  652. <div class="SIndent2">
  653. slotCount is the number of Slot structures in
  654. allocationList.
  655. </div>
  656. </div>
  657. </div>
  658. </td>
  659. </tr>
  660. <tr>
  661. <td>
  662. <div class="SVariable">
  663. <div class="SEntry">
  664. <div class="SIndent2">
  665. <a
  666. href="#_DUMA_Slot.unUsedSlots"
  667. id="link15"
  668. onMouseOver="ShowTip(event, 'tt15', 'link15')"
  669. onMouseOut="HideTip('tt15')"
  670. >unUsedSlots</a
  671. >
  672. </div>
  673. </div>
  674. </div>
  675. </td>
  676. <td>
  677. <div class="SVariable">
  678. <div class="SDescription">
  679. <div class="SIndent2">
  680. unUsedSlots is the number of Slot structures
  681. that are currently available to represent new
  682. malloc buffers.
  683. </div>
  684. </div>
  685. </div>
  686. </td>
  687. </tr>
  688. <tr class="SMarked">
  689. <td>
  690. <div class="SVariable">
  691. <div class="SEntry">
  692. <div class="SIndent2">
  693. <a
  694. href="#_DUMA_Slot.slotsPerPage"
  695. id="link16"
  696. onMouseOver="ShowTip(event, 'tt16', 'link16')"
  697. onMouseOut="HideTip('tt16')"
  698. >slotsPerPage</a
  699. >
  700. </div>
  701. </div>
  702. </div>
  703. </td>
  704. <td>
  705. <div class="SVariable">
  706. <div class="SDescription">
  707. <div class="SIndent2">
  708. slotsPerPage is the number of slot structures
  709. that fit in a virtual memory page.
  710. </div>
  711. </div>
  712. </div>
  713. </td>
  714. </tr>
  715. <tr>
  716. <td>
  717. <div class="SVariable">
  718. <div class="SEntry">
  719. <div class="SIndent2">
  720. <a
  721. href="#_DUMA_Slot.sumAllocatedMem"
  722. id="link17"
  723. onMouseOver="ShowTip(event, 'tt17', 'link17')"
  724. onMouseOut="HideTip('tt17')"
  725. >sumAllocatedMem</a
  726. >
  727. </div>
  728. </div>
  729. </div>
  730. </td>
  731. <td>
  732. <div class="SVariable">
  733. <div class="SDescription">
  734. <div class="SIndent2">
  735. internal variable: sum of allocated -freed
  736. +protected memory in kB
  737. </div>
  738. </div>
  739. </div>
  740. </td>
  741. </tr>
  742. <tr class="SMarked">
  743. <td>
  744. <div class="SVariable">
  745. <div class="SEntry">
  746. <div class="SIndent2">
  747. <a
  748. href="#_DUMA_Slot.sumTotalAllocatedMem"
  749. id="link18"
  750. onMouseOver="ShowTip(event, 'tt18', 'link18')"
  751. onMouseOut="HideTip('tt18')"
  752. >sumTotalAllocatedMem</a
  753. >
  754. </div>
  755. </div>
  756. </div>
  757. </td>
  758. <td>
  759. <div class="SVariable">
  760. <div class="SDescription">
  761. <div class="SIndent2">
  762. internal variable: sum of allocated memory in kB
  763. </div>
  764. </div>
  765. </div>
  766. </td>
  767. </tr>
  768. <tr>
  769. <td>
  770. <div class="SVariable">
  771. <div class="SEntry">
  772. <div class="SIndent2">
  773. <a
  774. href="#_DUMA_Slot.sumProtectedMem"
  775. id="link19"
  776. onMouseOver="ShowTip(event, 'tt19', 'link19')"
  777. onMouseOut="HideTip('tt19')"
  778. >sumProtectedMem</a
  779. >
  780. </div>
  781. </div>
  782. </div>
  783. </td>
  784. <td>
  785. <div class="SVariable">
  786. <div class="SDescription">
  787. <div class="SIndent2">
  788. internal variable: sum of protected memory in kB
  789. </div>
  790. </div>
  791. </div>
  792. </td>
  793. </tr>
  794. <tr class="SMarked">
  795. <td>
  796. <div class="SVariable">
  797. <div class="SEntry">
  798. <div class="SIndent2">
  799. <a
  800. href="#_DUMA_Slot.numDeallocs"
  801. id="link20"
  802. onMouseOver="ShowTip(event, 'tt20', 'link20')"
  803. onMouseOut="HideTip('tt20')"
  804. >numDeallocs</a
  805. >
  806. </div>
  807. </div>
  808. </div>
  809. </td>
  810. <td>
  811. <div class="SVariable">
  812. <div class="SDescription">
  813. <div class="SIndent2">
  814. internal variable: number of deallocations
  815. processed so far
  816. </div>
  817. </div>
  818. </div>
  819. </td>
  820. </tr>
  821. <tr>
  822. <td>
  823. <div class="SVariable">
  824. <div class="SEntry">
  825. <div class="SIndent2">
  826. <a
  827. href="#_DUMA_Slot.numAllocs"
  828. id="link21"
  829. onMouseOver="ShowTip(event, 'tt21', 'link21')"
  830. onMouseOut="HideTip('tt21')"
  831. >numAllocs</a
  832. >
  833. </div>
  834. </div>
  835. </div>
  836. </td>
  837. <td>
  838. <div class="SVariable">
  839. <div class="SDescription">
  840. <div class="SIndent2">
  841. internal variable: number of allocations
  842. processed so far
  843. </div>
  844. </div>
  845. </div>
  846. </td>
  847. </tr>
  848. <tr class="SMarked">
  849. <td>
  850. <div class="SVariable">
  851. <div class="SEntry">
  852. <div class="SIndent2">
  853. <a href="#_DUMA_Slot.duma_init_done"
  854. >duma_init_done</a
  855. >
  856. </div>
  857. </div>
  858. </div>
  859. </td>
  860. <td>
  861. <div class="SVariable">
  862. <div class="SDescription">
  863. <div class="SIndent2">
  864. internal variable: state of initialization
  865. </div>
  866. </div>
  867. </div>
  868. </td>
  869. </tr>
  870. <tr>
  871. <td>
  872. <div class="SGroup">
  873. <div class="SEntry">
  874. <div class="SIndent1">
  875. <a href="#_DUMA_Slot.Functions">Functions</a>
  876. </div>
  877. </div>
  878. </div>
  879. </td>
  880. <td>
  881. <div class="SGroup">
  882. <div class="SDescription">
  883. <div class="SIndent1"></div>
  884. </div>
  885. </div>
  886. </td>
  887. </tr>
  888. <tr class="SMarked">
  889. <td>
  890. <div class="SFunction">
  891. <div class="SEntry">
  892. <div class="SIndent2">
  893. <a
  894. href="#_DUMA_Slot._duma_assert"
  895. id="link22"
  896. onMouseOver="ShowTip(event, 'tt22', 'link22')"
  897. onMouseOut="HideTip('tt22')"
  898. >_duma_assert</a
  899. >
  900. </div>
  901. </div>
  902. </div>
  903. </td>
  904. <td>
  905. <div class="SFunction">
  906. <div class="SDescription">
  907. <div class="SIndent2">
  908. Print message and halt program execution in
  909. crazy way.
  910. </div>
  911. </div>
  912. </div>
  913. </td>
  914. </tr>
  915. <tr>
  916. <td>
  917. <div class="SFunction">
  918. <div class="SEntry">
  919. <div class="SIndent2">
  920. <a
  921. href="#_DUMA_Slot.duma_init"
  922. id="link23"
  923. onMouseOver="ShowTip(event, 'tt23', 'link23')"
  924. onMouseOut="HideTip('tt23')"
  925. >duma_init</a
  926. >
  927. </div>
  928. </div>
  929. </div>
  930. </td>
  931. <td>
  932. <div class="SFunction">
  933. <div class="SDescription">
  934. <div class="SIndent2">
  935. duma_init sets configuration settings.
  936. </div>
  937. </div>
  938. </div>
  939. </td>
  940. </tr>
  941. <tr class="SMarked">
  942. <td>
  943. <div class="SFunction">
  944. <div class="SEntry">
  945. <div class="SIndent2">
  946. <a
  947. href="#_DUMA_Slot._duma_init"
  948. id="link24"
  949. onMouseOver="ShowTip(event, 'tt24', 'link24')"
  950. onMouseOut="HideTip('tt24')"
  951. >_duma_init</a
  952. >
  953. </div>
  954. </div>
  955. </div>
  956. </td>
  957. <td>
  958. <div class="SFunction">
  959. <div class="SDescription">
  960. <div class="SIndent2">
  961. _duma_init sets up the memory allocation arena
  962. and the run-time configuration information.
  963. </div>
  964. </div>
  965. </div>
  966. </td>
  967. </tr>
  968. <tr>
  969. <td>
  970. <div class="SFunction">
  971. <div class="SEntry">
  972. <div class="SIndent2">
  973. <a
  974. href="#_DUMA_Slot.allocateMoreSlots"
  975. id="link25"
  976. onMouseOver="ShowTip(event, 'tt25', 'link25')"
  977. onMouseOut="HideTip('tt25')"
  978. >allocateMoreSlots</a
  979. >
  980. </div>
  981. </div>
  982. </div>
  983. </td>
  984. <td>
  985. <div class="SFunction">
  986. <div class="SDescription">
  987. <div class="SIndent2">
  988. allocateMoreSlots is called when there are only
  989. enough slot structures left to support the
  990. allocation of a single malloc buffer.
  991. </div>
  992. </div>
  993. </div>
  994. </td>
  995. </tr>
  996. <tr class="SMarked">
  997. <td>
  998. <div class="SFunction">
  999. <div class="SEntry">
  1000. <div class="SIndent2">
  1001. <a
  1002. href="#_DUMA_Slot._duma_allocate"
  1003. id="link26"
  1004. onMouseOver="ShowTip(event, 'tt26', 'link26')"
  1005. onMouseOut="HideTip('tt26')"
  1006. >_duma_allocate</a
  1007. >
  1008. </div>
  1009. </div>
  1010. </div>
  1011. </td>
  1012. <td>
  1013. <div class="SFunction">
  1014. <div class="SDescription">
  1015. <div class="SIndent2">
  1016. This is the memory allocator.
  1017. </div>
  1018. </div>
  1019. </div>
  1020. </td>
  1021. </tr>
  1022. <tr>
  1023. <td>
  1024. <div class="SFunction">
  1025. <div class="SEntry">
  1026. <div class="SIndent2">
  1027. <a
  1028. href="#_DUMA_Slot._duma_deallocate"
  1029. id="link27"
  1030. onMouseOver="ShowTip(event, 'tt27', 'link27')"
  1031. onMouseOut="HideTip('tt27')"
  1032. >_duma_deallocate</a
  1033. >
  1034. </div>
  1035. </div>
  1036. </div>
  1037. </td>
  1038. <td>
  1039. <div class="SFunction">
  1040. <div class="SDescription">
  1041. <div class="SIndent2">
  1042. Deallocate allocated memory after running some
  1043. checks, then open slot for use.
  1044. </div>
  1045. </div>
  1046. </div>
  1047. </td>
  1048. </tr>
  1049. <tr class="SMarked">
  1050. <td>
  1051. <div class="SFunction">
  1052. <div class="SEntry">
  1053. <div class="SIndent2">
  1054. <a
  1055. href="#_DUMA_Slot._duma_kmalloc"
  1056. id="link28"
  1057. onMouseOver="ShowTip(event, 'tt28', 'link28')"
  1058. onMouseOut="HideTip('tt28')"
  1059. >_duma_kmalloc</a
  1060. >
  1061. </div>
  1062. </div>
  1063. </div>
  1064. </td>
  1065. <td>
  1066. <div class="SFunction">
  1067. <div class="SDescription">
  1068. <div class="SIndent2">A version of kmalloc.</div>
  1069. </div>
  1070. </div>
  1071. </td>
  1072. </tr>
  1073. </table>
  1074. </div>
  1075. </div>
  1076. <!--END_ND_SUMMARY-->
  1077. </div>
  1078. </div>
  1079. </div>
  1080. <div class="CGroup">
  1081. <div class="CTopic">
  1082. <h3 class="CTitle"><a name="Variables"></a>Variables</h3>
  1083. </div>
  1084. </div>
  1085. <div class="CVariable">
  1086. <div class="CTopic">
  1087. <h3 class="CTitle"><a name="version"></a>version</h3>
  1088. <div class="CBody">
  1089. <blockquote>
  1090. <table
  1091. border="0"
  1092. cellspacing="0"
  1093. cellpadding="0"
  1094. class="Prototype"
  1095. >
  1096. <tr>
  1097. <td>static const char version[]</td>
  1098. </tr>
  1099. </table>
  1100. </blockquote>
  1101. <p class="CParagraph">KDUMA version string</p>
  1102. </div>
  1103. </div>
  1104. </div>
  1105. <div class="CVariable">
  1106. <div class="CTopic">
  1107. <h3 class="CTitle">
  1108. <a name="MEMORY_CREATION_SIZE"></a>MEMORY_CREATION_SIZE
  1109. </h3>
  1110. <div class="CBody">
  1111. <p class="CParagraph">
  1112. MEMORY_CREATION_SIZE is the amount of memory to get from the
  1113. operating system at one time.&nbsp; We&rsquo;ll break that
  1114. memory down into smaller pieces for malloc buffers.&nbsp; One
  1115. megabyte is probably a good value.
  1116. </p>
  1117. </div>
  1118. </div>
  1119. </div>
  1120. <div class="CGroup">
  1121. <div class="CTopic">
  1122. <h3 class="CTitle"><a name="Enumerations"></a>Enumerations</h3>
  1123. </div>
  1124. </div>
  1125. <div class="CEnumeration">
  1126. <div class="CTopic">
  1127. <h3 class="CTitle">
  1128. <a name="_DUMA_SlotState"></a>_DUMA_SlotState
  1129. </h3>
  1130. <div class="CBody">
  1131. <p class="CParagraph">
  1132. State of slot values (empty, free, etc)
  1133. </p>
  1134. </div>
  1135. </div>
  1136. </div>
  1137. <div class="CEnumeration">
  1138. <div class="CTopic">
  1139. <h3 class="CTitle">
  1140. <a name="_DUMA_Slot_FileSource"></a>_DUMA_Slot_FileSource
  1141. </h3>
  1142. <div class="CBody">
  1143. <p class="CParagraph">Where did we get file info</p>
  1144. </div>
  1145. </div>
  1146. </div>
  1147. <div class="CEnumeration">
  1148. <div class="CTopic">
  1149. <h3 class="CTitle">
  1150. <a name="_DUMA_InitState"></a>_DUMA_InitState
  1151. </h3>
  1152. <div class="CBody">
  1153. <p class="CParagraph">Whats are initialization start</p>
  1154. </div>
  1155. </div>
  1156. </div>
  1157. <div class="CEnumeration">
  1158. <div class="CTopic">
  1159. <h3 class="CTitle">
  1160. <a name="_DUMA_MemRegion"></a>_DUMA_MemRegion
  1161. </h3>
  1162. <div class="CBody">
  1163. <p class="CParagraph">
  1164. Memory region of slot.&nbsp; Really we should only hang onto
  1165. NORMAL memory.&nbsp; DMA should be released fast.
  1166. </p>
  1167. </div>
  1168. </div>
  1169. </div>
  1170. <div class="CClass">
  1171. <div class="CTopic">
  1172. <h2 class="CTitle"><a name="_DUMA_Slot"></a>_DUMA_Slot</h2>
  1173. <div class="CBody">
  1174. <p class="CParagraph">
  1175. Struct Slot contains all of the information about a malloc
  1176. buffer except for the contents of its memory.
  1177. </p>
  1178. <!--START_ND_SUMMARY-->
  1179. <div class="Summary">
  1180. <div class="STitle">Summary</div>
  1181. <div class="SBorder">
  1182. <table
  1183. border="0"
  1184. cellspacing="0"
  1185. cellpadding="0"
  1186. class="STable"
  1187. >
  1188. <tr>
  1189. <td class="SEntrySize">
  1190. <div class="SGroup">
  1191. <div class="SEntry">
  1192. <a href="#_DUMA_Slot.Variables">Variables</a>
  1193. </div>
  1194. </div>
  1195. </td>
  1196. <td class="SDescriptionSize">
  1197. <div class="SGroup">
  1198. <div class="SDescription"></div>
  1199. </div>
  1200. </td>
  1201. </tr>
  1202. <tr class="SMarked">
  1203. <td>
  1204. <div class="SVariable">
  1205. <div class="SEntry">
  1206. <div class="SIndent1">
  1207. <a
  1208. href="#_DUMA_Slot.DUMA_ALIGNMENT"
  1209. id="link29"
  1210. onMouseOver="ShowTip(event, 'tt2', 'link29')"
  1211. onMouseOut="HideTip('tt2')"
  1212. >DUMA_ALIGNMENT</a
  1213. >
  1214. </div>
  1215. </div>
  1216. </div>
  1217. </td>
  1218. <td>
  1219. <div class="SVariable">
  1220. <div class="SDescription">
  1221. <div class="SIndent1">
  1222. DUMA_ALIGNMENT is a global variable used to
  1223. control the default alignment of buffers
  1224. returned by malloc(), calloc(), and realloc().
  1225. </div>
  1226. </div>
  1227. </div>
  1228. </td>
  1229. </tr>
  1230. <tr>
  1231. <td>
  1232. <div class="SVariable">
  1233. <div class="SEntry">
  1234. <div class="SIndent1">
  1235. <a
  1236. href="#_DUMA_Slot.DUMA_PROTECT_BELOW"
  1237. id="link30"
  1238. onMouseOver="ShowTip(event, 'tt3', 'link30')"
  1239. onMouseOut="HideTip('tt3')"
  1240. >DUMA_PROTECT_BELOW</a
  1241. >
  1242. </div>
  1243. </div>
  1244. </div>
  1245. </td>
  1246. <td>
  1247. <div class="SVariable">
  1248. <div class="SDescription">
  1249. <div class="SIndent1">
  1250. DUMA_PROTECT_BELOW is used to modify the
  1251. behavior of the allocator.
  1252. </div>
  1253. </div>
  1254. </div>
  1255. </td>
  1256. </tr>
  1257. <tr class="SMarked">
  1258. <td>
  1259. <div class="SVariable">
  1260. <div class="SEntry">
  1261. <div class="SIndent1">
  1262. <a
  1263. href="#_DUMA_Slot.DUMA_FILL"
  1264. id="link31"
  1265. onMouseOver="ShowTip(event, 'tt4', 'link31')"
  1266. onMouseOut="HideTip('tt4')"
  1267. >DUMA_FILL</a
  1268. >
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </td>
  1273. <td>
  1274. <div class="SVariable">
  1275. <div class="SDescription">
  1276. <div class="SIndent1">
  1277. DUMA_FILL is set to 0-255 if DUMA should fill
  1278. all new allocated memory with the specified
  1279. value.
  1280. </div>
  1281. </div>
  1282. </div>
  1283. </td>
  1284. </tr>
  1285. <tr>
  1286. <td>
  1287. <div class="SVariable">
  1288. <div class="SEntry">
  1289. <div class="SIndent1">
  1290. <a
  1291. href="#_DUMA_Slot.DUMA_SLACKFILL"
  1292. id="link32"
  1293. onMouseOver="ShowTip(event, 'tt5', 'link32')"
  1294. onMouseOut="HideTip('tt5')"
  1295. >DUMA_SLACKFILL</a
  1296. >
  1297. </div>
  1298. </div>
  1299. </div>
  1300. </td>
  1301. <td>
  1302. <div class="SVariable">
  1303. <div class="SDescription">
  1304. <div class="SIndent1">
  1305. DUMA_SLACKFILL is set to 0-255.
  1306. </div>
  1307. </div>
  1308. </div>
  1309. </td>
  1310. </tr>
  1311. <tr class="SMarked">
  1312. <td>
  1313. <div class="SVariable">
  1314. <div class="SEntry">
  1315. <div class="SIndent1">
  1316. <a
  1317. href="#_DUMA_Slot.DUMA_PROTECT_FREE"
  1318. id="link33"
  1319. onMouseOver="ShowTip(event, 'tt6', 'link33')"
  1320. onMouseOut="HideTip('tt6')"
  1321. >DUMA_PROTECT_FREE</a
  1322. >
  1323. </div>
  1324. </div>
  1325. </div>
  1326. </td>
  1327. <td>
  1328. <div class="SVariable">
  1329. <div class="SDescription">
  1330. <div class="SIndent1">
  1331. DUMA_PROTECT_FREE is used to control the
  1332. disposition of memory that is released using
  1333. free().
  1334. </div>
  1335. </div>
  1336. </div>
  1337. </td>
  1338. </tr>
  1339. <tr>
  1340. <td>
  1341. <div class="SVariable">
  1342. <div class="SEntry">
  1343. <div class="SIndent1">
  1344. <a
  1345. href="#_DUMA_Slot.DUMA_MAX_ALLOC"
  1346. id="link34"
  1347. onMouseOver="ShowTip(event, 'tt7', 'link34')"
  1348. onMouseOut="HideTip('tt7')"
  1349. >DUMA_MAX_ALLOC</a
  1350. >
  1351. </div>
  1352. </div>
  1353. </div>
  1354. </td>
  1355. <td>
  1356. <div class="SVariable">
  1357. <div class="SDescription">
  1358. <div class="SIndent1">
  1359. DUMA_MAX_ALLOC is used to control the maximum
  1360. memory print of the program in total: When the
  1361. sum of allocated and protected memory would
  1362. exceed this value in kB, the protected memory is
  1363. freed/deleted.
  1364. </div>
  1365. </div>
  1366. </div>
  1367. </td>
  1368. </tr>
  1369. <tr class="SMarked">
  1370. <td>
  1371. <div class="SVariable">
  1372. <div class="SEntry">
  1373. <div class="SIndent1">
  1374. <a
  1375. href="#_DUMA_Slot.DUMA_ALLOW_MALLOC_0"
  1376. id="link35"
  1377. onMouseOver="ShowTip(event, 'tt8', 'link35')"
  1378. onMouseOut="HideTip('tt8')"
  1379. >DUMA_ALLOW_MALLOC_0</a
  1380. >
  1381. </div>
  1382. </div>
  1383. </div>
  1384. </td>
  1385. <td>
  1386. <div class="SVariable">
  1387. <div class="SDescription">
  1388. <div class="SIndent1">
  1389. DUMA_ALLOW_MALLOC_0 is set if DUMA is to allow
  1390. malloc(0).
  1391. </div>
  1392. </div>
  1393. </div>
  1394. </td>
  1395. </tr>
  1396. <tr>
  1397. <td>
  1398. <div class="SVariable">
  1399. <div class="SEntry">
  1400. <div class="SIndent1">
  1401. <a
  1402. href="#_DUMA_Slot.DUMA_MALLOC_FAILEXIT"
  1403. id="link36"
  1404. onMouseOver="ShowTip(event, 'tt9', 'link36')"
  1405. onMouseOut="HideTip('tt9')"
  1406. >DUMA_MALLOC_FAILEXIT</a
  1407. >
  1408. </div>
  1409. </div>
  1410. </div>
  1411. </td>
  1412. <td>
  1413. <div class="SVariable">
  1414. <div class="SDescription">
  1415. <div class="SIndent1">
  1416. DUMA_MALLOC_FAILEXIT controls the behaviour of
  1417. DUMA when malloc() fails and would return NULL.
  1418. </div>
  1419. </div>
  1420. </div>
  1421. </td>
  1422. </tr>
  1423. <tr class="SMarked">
  1424. <td>
  1425. <div class="SVariable">
  1426. <div class="SEntry">
  1427. <div class="SIndent1">
  1428. <a
  1429. href="#_DUMA_Slot.DUMA_FREE_ACCESS"
  1430. id="link37"
  1431. onMouseOver="ShowTip(event, 'tt10', 'link37')"
  1432. onMouseOut="HideTip('tt10')"
  1433. >DUMA_FREE_ACCESS</a
  1434. >
  1435. </div>
  1436. </div>
  1437. </div>
  1438. </td>
  1439. <td>
  1440. <div class="SVariable">
  1441. <div class="SDescription">
  1442. <div class="SIndent1">
  1443. DUMA_FREE_ACCESS is set if DUMA is to write
  1444. access memory before freeing it.
  1445. </div>
  1446. </div>
  1447. </div>
  1448. </td>
  1449. </tr>
  1450. <tr>
  1451. <td>
  1452. <div class="SVariable">
  1453. <div class="SEntry">
  1454. <div class="SIndent1">
  1455. <a
  1456. href="#_DUMA_Slot.DUMA_SHOW_ALLOC"
  1457. id="link38"
  1458. onMouseOver="ShowTip(event, 'tt11', 'link38')"
  1459. onMouseOut="HideTip('tt11')"
  1460. >DUMA_SHOW_ALLOC</a
  1461. >
  1462. </div>
  1463. </div>
  1464. </div>
  1465. </td>
  1466. <td>
  1467. <div class="SVariable">
  1468. <div class="SDescription">
  1469. <div class="SIndent1">
  1470. DUMA_SHOW_ALLOC is set if DUMA is to print all
  1471. allocations and deallocations to the console.
  1472. </div>
  1473. </div>
  1474. </div>
  1475. </td>
  1476. </tr>
  1477. <tr class="SMarked">
  1478. <td>
  1479. <div class="SVariable">
  1480. <div class="SEntry">
  1481. <div class="SIndent1">
  1482. <a
  1483. href="#_DUMA_Slot._duma_allocList"
  1484. id="link39"
  1485. onMouseOver="ShowTip(event, 'tt12', 'link39')"
  1486. onMouseOut="HideTip('tt12')"
  1487. >_duma_allocList</a
  1488. >
  1489. </div>
  1490. </div>
  1491. </div>
  1492. </td>
  1493. <td>
  1494. <div class="SVariable">
  1495. <div class="SDescription">
  1496. <div class="SIndent1">
  1497. _DUMA_allocList points to the array of slot
  1498. structures used to manage the malloc arena.
  1499. </div>
  1500. </div>
  1501. </div>
  1502. </td>
  1503. </tr>
  1504. <tr>
  1505. <td>
  1506. <div class="SVariable">
  1507. <div class="SEntry">
  1508. <div class="SIndent1">
  1509. <a
  1510. href="#_DUMA_Slot._duma_allocListSize"
  1511. id="link40"
  1512. onMouseOver="ShowTip(event, 'tt13', 'link40')"
  1513. onMouseOut="HideTip('tt13')"
  1514. >_duma_allocListSize</a
  1515. >
  1516. </div>
  1517. </div>
  1518. </div>
  1519. </td>
  1520. <td>
  1521. <div class="SVariable">
  1522. <div class="SDescription">
  1523. <div class="SIndent1">
  1524. _duma_allocListSize is the size of the
  1525. allocation list.
  1526. </div>
  1527. </div>
  1528. </div>
  1529. </td>
  1530. </tr>
  1531. <tr class="SMarked">
  1532. <td>
  1533. <div class="SVariable">
  1534. <div class="SEntry">
  1535. <div class="SIndent1">
  1536. <a
  1537. href="#_DUMA_Slot.slotCount"
  1538. id="link41"
  1539. onMouseOver="ShowTip(event, 'tt14', 'link41')"
  1540. onMouseOut="HideTip('tt14')"
  1541. >slotCount</a
  1542. >
  1543. </div>
  1544. </div>
  1545. </div>
  1546. </td>
  1547. <td>
  1548. <div class="SVariable">
  1549. <div class="SDescription">
  1550. <div class="SIndent1">
  1551. slotCount is the number of Slot structures in
  1552. allocationList.
  1553. </div>
  1554. </div>
  1555. </div>
  1556. </td>
  1557. </tr>
  1558. <tr>
  1559. <td>
  1560. <div class="SVariable">
  1561. <div class="SEntry">
  1562. <div class="SIndent1">
  1563. <a
  1564. href="#_DUMA_Slot.unUsedSlots"
  1565. id="link42"
  1566. onMouseOver="ShowTip(event, 'tt15', 'link42')"
  1567. onMouseOut="HideTip('tt15')"
  1568. >unUsedSlots</a
  1569. >
  1570. </div>
  1571. </div>
  1572. </div>
  1573. </td>
  1574. <td>
  1575. <div class="SVariable">
  1576. <div class="SDescription">
  1577. <div class="SIndent1">
  1578. unUsedSlots is the number of Slot structures
  1579. that are currently available to represent new
  1580. malloc buffers.
  1581. </div>
  1582. </div>
  1583. </div>
  1584. </td>
  1585. </tr>
  1586. <tr class="SMarked">
  1587. <td>
  1588. <div class="SVariable">
  1589. <div class="SEntry">
  1590. <div class="SIndent1">
  1591. <a
  1592. href="#_DUMA_Slot.slotsPerPage"
  1593. id="link43"
  1594. onMouseOver="ShowTip(event, 'tt16', 'link43')"
  1595. onMouseOut="HideTip('tt16')"
  1596. >slotsPerPage</a
  1597. >
  1598. </div>
  1599. </div>
  1600. </div>
  1601. </td>
  1602. <td>
  1603. <div class="SVariable">
  1604. <div class="SDescription">
  1605. <div class="SIndent1">
  1606. slotsPerPage is the number of slot structures
  1607. that fit in a virtual memory page.
  1608. </div>
  1609. </div>
  1610. </div>
  1611. </td>
  1612. </tr>
  1613. <tr>
  1614. <td>
  1615. <div class="SVariable">
  1616. <div class="SEntry">
  1617. <div class="SIndent1">
  1618. <a
  1619. href="#_DUMA_Slot.sumAllocatedMem"
  1620. id="link44"
  1621. onMouseOver="ShowTip(event, 'tt17', 'link44')"
  1622. onMouseOut="HideTip('tt17')"
  1623. >sumAllocatedMem</a
  1624. >
  1625. </div>
  1626. </div>
  1627. </div>
  1628. </td>
  1629. <td>
  1630. <div class="SVariable">
  1631. <div class="SDescription">
  1632. <div class="SIndent1">
  1633. internal variable: sum of allocated -freed
  1634. +protected memory in kB
  1635. </div>
  1636. </div>
  1637. </div>
  1638. </td>
  1639. </tr>
  1640. <tr class="SMarked">
  1641. <td>
  1642. <div class="SVariable">
  1643. <div class="SEntry">
  1644. <div class="SIndent1">
  1645. <a
  1646. href="#_DUMA_Slot.sumTotalAllocatedMem"
  1647. id="link45"
  1648. onMouseOver="ShowTip(event, 'tt18', 'link45')"
  1649. onMouseOut="HideTip('tt18')"
  1650. >sumTotalAllocatedMem</a
  1651. >
  1652. </div>
  1653. </div>
  1654. </div>
  1655. </td>
  1656. <td>
  1657. <div class="SVariable">
  1658. <div class="SDescription">
  1659. <div class="SIndent1">
  1660. internal variable: sum of allocated memory in kB
  1661. </div>
  1662. </div>
  1663. </div>
  1664. </td>
  1665. </tr>
  1666. <tr>
  1667. <td>
  1668. <div class="SVariable">
  1669. <div class="SEntry">
  1670. <div class="SIndent1">
  1671. <a
  1672. href="#_DUMA_Slot.sumProtectedMem"
  1673. id="link46"
  1674. onMouseOver="ShowTip(event, 'tt19', 'link46')"
  1675. onMouseOut="HideTip('tt19')"
  1676. >sumProtectedMem</a
  1677. >
  1678. </div>
  1679. </div>
  1680. </div>
  1681. </td>
  1682. <td>
  1683. <div class="SVariable">
  1684. <div class="SDescription">
  1685. <div class="SIndent1">
  1686. internal variable: sum of protected memory in kB
  1687. </div>
  1688. </div>
  1689. </div>
  1690. </td>
  1691. </tr>
  1692. <tr class="SMarked">
  1693. <td>
  1694. <div class="SVariable">
  1695. <div class="SEntry">
  1696. <div class="SIndent1">
  1697. <a
  1698. href="#_DUMA_Slot.numDeallocs"
  1699. id="link47"
  1700. onMouseOver="ShowTip(event, 'tt20', 'link47')"
  1701. onMouseOut="HideTip('tt20')"
  1702. >numDeallocs</a
  1703. >
  1704. </div>
  1705. </div>
  1706. </div>
  1707. </td>
  1708. <td>
  1709. <div class="SVariable">
  1710. <div class="SDescription">
  1711. <div class="SIndent1">
  1712. internal variable: number of deallocations
  1713. processed so far
  1714. </div>
  1715. </div>
  1716. </div>
  1717. </td>
  1718. </tr>
  1719. <tr>
  1720. <td>
  1721. <div class="SVariable">
  1722. <div class="SEntry">
  1723. <div class="SIndent1">
  1724. <a
  1725. href="#_DUMA_Slot.numAllocs"
  1726. id="link48"
  1727. onMouseOver="ShowTip(event, 'tt21', 'link48')"
  1728. onMouseOut="HideTip('tt21')"
  1729. >numAllocs</a
  1730. >
  1731. </div>
  1732. </div>
  1733. </div>
  1734. </td>
  1735. <td>
  1736. <div class="SVariable">
  1737. <div class="SDescription">
  1738. <div class="SIndent1">
  1739. internal variable: number of allocations
  1740. processed so far
  1741. </div>
  1742. </div>
  1743. </div>
  1744. </td>
  1745. </tr>
  1746. <tr class="SMarked">
  1747. <td>
  1748. <div class="SVariable">
  1749. <div class="SEntry">
  1750. <div class="SIndent1">
  1751. <a href="#_DUMA_Slot.duma_init_done"
  1752. >duma_init_done</a
  1753. >
  1754. </div>
  1755. </div>
  1756. </div>
  1757. </td>
  1758. <td>
  1759. <div class="SVariable">
  1760. <div class="SDescription">
  1761. <div class="SIndent1">
  1762. internal variable: state of initialization
  1763. </div>
  1764. </div>
  1765. </div>
  1766. </td>
  1767. </tr>
  1768. <tr>
  1769. <td>
  1770. <div class="SGroup">
  1771. <div class="SEntry">
  1772. <a href="#_DUMA_Slot.Functions">Functions</a>
  1773. </div>
  1774. </div>
  1775. </td>
  1776. <td>
  1777. <div class="SGroup">
  1778. <div class="SDescription"></div>
  1779. </div>
  1780. </td>
  1781. </tr>
  1782. <tr class="SMarked">
  1783. <td>
  1784. <div class="SFunction">
  1785. <div class="SEntry">
  1786. <div class="SIndent1">
  1787. <a
  1788. href="#_DUMA_Slot._duma_assert"
  1789. id="link49"
  1790. onMouseOver="ShowTip(event, 'tt22', 'link49')"
  1791. onMouseOut="HideTip('tt22')"
  1792. >_duma_assert</a
  1793. >
  1794. </div>
  1795. </div>
  1796. </div>
  1797. </td>
  1798. <td>
  1799. <div class="SFunction">
  1800. <div class="SDescription">
  1801. <div class="SIndent1">
  1802. Print message and halt program execution in
  1803. crazy way.
  1804. </div>
  1805. </div>
  1806. </div>
  1807. </td>
  1808. </tr>
  1809. <tr>
  1810. <td>
  1811. <div class="SFunction">
  1812. <div class="SEntry">
  1813. <div class="SIndent1">
  1814. <a
  1815. href="#_DUMA_Slot.duma_init"
  1816. id="link50"
  1817. onMouseOver="ShowTip(event, 'tt23', 'link50')"
  1818. onMouseOut="HideTip('tt23')"
  1819. >duma_init</a
  1820. >
  1821. </div>
  1822. </div>
  1823. </div>
  1824. </td>
  1825. <td>
  1826. <div class="SFunction">
  1827. <div class="SDescription">
  1828. <div class="SIndent1">
  1829. duma_init sets configuration settings.
  1830. </div>
  1831. </div>
  1832. </div>
  1833. </td>
  1834. </tr>
  1835. <tr class="SMarked">
  1836. <td>
  1837. <div class="SFunction">
  1838. <div class="SEntry">
  1839. <div class="SIndent1">
  1840. <a
  1841. href="#_DUMA_Slot._duma_init"
  1842. id="link51"
  1843. onMouseOver="ShowTip(event, 'tt24', 'link51')"
  1844. onMouseOut="HideTip('tt24')"
  1845. >_duma_init</a
  1846. >
  1847. </div>
  1848. </div>
  1849. </div>
  1850. </td>
  1851. <td>
  1852. <div class="SFunction">
  1853. <div class="SDescription">
  1854. <div class="SIndent1">
  1855. _duma_init sets up the memory allocation arena
  1856. and the run-time configuration information.
  1857. </div>
  1858. </div>
  1859. </div>
  1860. </td>
  1861. </tr>
  1862. <tr>
  1863. <td>
  1864. <div class="SFunction">
  1865. <div class="SEntry">
  1866. <div class="SIndent1">
  1867. <a
  1868. href="#_DUMA_Slot.allocateMoreSlots"
  1869. id="link52"
  1870. onMouseOver="ShowTip(event, 'tt25', 'link52')"
  1871. onMouseOut="HideTip('tt25')"
  1872. >allocateMoreSlots</a
  1873. >
  1874. </div>
  1875. </div>
  1876. </div>
  1877. </td>
  1878. <td>
  1879. <div class="SFunction">
  1880. <div class="SDescription">
  1881. <div class="SIndent1">
  1882. allocateMoreSlots is called when there are only
  1883. enough slot structures left to support the
  1884. allocation of a single malloc buffer.
  1885. </div>
  1886. </div>
  1887. </div>
  1888. </td>
  1889. </tr>
  1890. <tr class="SMarked">
  1891. <td>
  1892. <div class="SFunction">
  1893. <div class="SEntry">
  1894. <div class="SIndent1">
  1895. <a
  1896. href="#_DUMA_Slot._duma_allocate"
  1897. id="link53"
  1898. onMouseOver="ShowTip(event, 'tt26', 'link53')"
  1899. onMouseOut="HideTip('tt26')"
  1900. >_duma_allocate</a
  1901. >
  1902. </div>
  1903. </div>
  1904. </div>
  1905. </td>
  1906. <td>
  1907. <div class="SFunction">
  1908. <div class="SDescription">
  1909. <div class="SIndent1">
  1910. This is the memory allocator.
  1911. </div>
  1912. </div>
  1913. </div>
  1914. </td>
  1915. </tr>
  1916. <tr>
  1917. <td>
  1918. <div class="SFunction">
  1919. <div class="SEntry">
  1920. <div class="SIndent1">
  1921. <a
  1922. href="#_DUMA_Slot._duma_deallocate"
  1923. id="link54"
  1924. onMouseOver="ShowTip(event, 'tt27', 'link54')"
  1925. onMouseOut="HideTip('tt27')"
  1926. >_duma_deallocate</a
  1927. >
  1928. </div>
  1929. </div>
  1930. </div>
  1931. </td>
  1932. <td>
  1933. <div class="SFunction">
  1934. <div class="SDescription">
  1935. <div class="SIndent1">
  1936. Deallocate allocated memory after running some
  1937. checks, then open slot for use.
  1938. </div>
  1939. </div>
  1940. </div>
  1941. </td>
  1942. </tr>
  1943. <tr class="SMarked">
  1944. <td>
  1945. <div class="SFunction">
  1946. <div class="SEntry">
  1947. <div class="SIndent1">
  1948. <a
  1949. href="#_DUMA_Slot._duma_kmalloc"
  1950. id="link55"
  1951. onMouseOver="ShowTip(event, 'tt28', 'link55')"
  1952. onMouseOut="HideTip('tt28')"
  1953. >_duma_kmalloc</a
  1954. >
  1955. </div>
  1956. </div>
  1957. </div>
  1958. </td>
  1959. <td>
  1960. <div class="SFunction">
  1961. <div class="SDescription">
  1962. <div class="SIndent1">A version of kmalloc.</div>
  1963. </div>
  1964. </div>
  1965. </td>
  1966. </tr>
  1967. </table>
  1968. </div>
  1969. </div>
  1970. <!--END_ND_SUMMARY-->
  1971. </div>
  1972. </div>
  1973. </div>
  1974. <div class="CGroup">
  1975. <div class="CTopic">
  1976. <h3 class="CTitle">
  1977. <a name="_DUMA_Slot.Variables"></a>Variables
  1978. </h3>
  1979. </div>
  1980. </div>
  1981. <div class="CVariable">
  1982. <div class="CTopic">
  1983. <h3 class="CTitle">
  1984. <a name="_DUMA_Slot.DUMA_ALIGNMENT"></a>DUMA_ALIGNMENT
  1985. </h3>
  1986. <div class="CBody">
  1987. <blockquote>
  1988. <table
  1989. border="0"
  1990. cellspacing="0"
  1991. cellpadding="0"
  1992. class="Prototype"
  1993. >
  1994. <tr>
  1995. <td>size_t DUMA_ALIGNMENT</td>
  1996. </tr>
  1997. </table>
  1998. </blockquote>
  1999. <p class="CParagraph">
  2000. DUMA_ALIGNMENT is a global variable used to control the
  2001. default alignment of buffers returned by malloc(), calloc(),
  2002. and realloc().&nbsp; It is all-caps so that its name matches
  2003. the name of the environment variable that is used to set
  2004. it.&nbsp; This gives the programmer one less name to remember.
  2005. </p>
  2006. </div>
  2007. </div>
  2008. </div>
  2009. <div class="CVariable">
  2010. <div class="CTopic">
  2011. <h3 class="CTitle">
  2012. <a name="_DUMA_Slot.DUMA_PROTECT_BELOW"></a>DUMA_PROTECT_BELOW
  2013. </h3>
  2014. <div class="CBody">
  2015. <blockquote>
  2016. <table
  2017. border="0"
  2018. cellspacing="0"
  2019. cellpadding="0"
  2020. class="Prototype"
  2021. >
  2022. <tr>
  2023. <td>int DUMA_PROTECT_BELOW</td>
  2024. </tr>
  2025. </table>
  2026. </blockquote>
  2027. <p class="CParagraph">
  2028. DUMA_PROTECT_BELOW is used to modify the behavior of the
  2029. allocator.&nbsp; When its value is non-zero, the allocator
  2030. will place an inaccessable page immediately <u>before</u> the
  2031. malloc buffer in the address space, instead of
  2032. <u>after</u> it.&nbsp; Use this to detect malloc buffer
  2033. under-runs, rather than over-runs.&nbsp; It won&rsquo;t detect
  2034. both at the same time, so you should test your software twice,
  2035. once with this value clear, and once with it set.
  2036. </p>
  2037. </div>
  2038. </div>
  2039. </div>
  2040. <div class="CVariable">
  2041. <div class="CTopic">
  2042. <h3 class="CTitle">
  2043. <a name="_DUMA_Slot.DUMA_FILL"></a>DUMA_FILL
  2044. </h3>
  2045. <div class="CBody">
  2046. <blockquote>
  2047. <table
  2048. border="0"
  2049. cellspacing="0"
  2050. cellpadding="0"
  2051. class="Prototype"
  2052. >
  2053. <tr>
  2054. <td>int DUMA_FILL</td>
  2055. </tr>
  2056. </table>
  2057. </blockquote>
  2058. <p class="CParagraph">
  2059. DUMA_FILL is set to 0-255 if DUMA should fill all new
  2060. allocated memory with the specified value.&nbsp; Set to -1
  2061. when DUMA should not initialise allocated memory. default is
  2062. set to initialise with 255, cause many programs rely on
  2063. initialisation to 0!
  2064. </p>
  2065. </div>
  2066. </div>
  2067. </div>
  2068. <div class="CVariable">
  2069. <div class="CTopic">
  2070. <h3 class="CTitle">
  2071. <a name="_DUMA_Slot.DUMA_SLACKFILL"></a>DUMA_SLACKFILL
  2072. </h3>
  2073. <div class="CBody">
  2074. <blockquote>
  2075. <table
  2076. border="0"
  2077. cellspacing="0"
  2078. cellpadding="0"
  2079. class="Prototype"
  2080. >
  2081. <tr>
  2082. <td>static int DUMA_SLACKFILL</td>
  2083. </tr>
  2084. </table>
  2085. </blockquote>
  2086. <p class="CParagraph">
  2087. DUMA_SLACKFILL is set to 0-255.&nbsp; The slack / no mans land
  2088. of all new allocated memory is filled with the specified
  2089. value. default is set to initialise with 0xAA (=binary
  2090. 10101010) initialisation to 0!
  2091. </p>
  2092. </div>
  2093. </div>
  2094. </div>
  2095. <div class="CVariable">
  2096. <div class="CTopic">
  2097. <h3 class="CTitle">
  2098. <a name="_DUMA_Slot.DUMA_PROTECT_FREE"></a>DUMA_PROTECT_FREE
  2099. </h3>
  2100. <div class="CBody">
  2101. <blockquote>
  2102. <table
  2103. border="0"
  2104. cellspacing="0"
  2105. cellpadding="0"
  2106. class="Prototype"
  2107. >
  2108. <tr>
  2109. <td>static long DUMA_PROTECT_FREE</td>
  2110. </tr>
  2111. </table>
  2112. </blockquote>
  2113. <p class="CParagraph">
  2114. DUMA_PROTECT_FREE is used to control the disposition of memory
  2115. that is released using free().&nbsp; It is all-caps so that
  2116. its name matches the name of the environment variable that is
  2117. used to set it.&nbsp; If its value is non-zero, memory
  2118. released by free is made inaccessable.&nbsp; Any software that
  2119. touches free memory will then get a segmentation fault.&nbsp;
  2120. Depending on your application and your resources you may tell
  2121. DUMA not to use this memory ever again by setting a negative
  2122. value f.e.&nbsp; -1.&nbsp; You can tell DUMA to limit the sum
  2123. of protected memory by setting a positive value, which is
  2124. interpreted in kB.&nbsp; If its value is zero, freed memory
  2125. will be available for reallocation, but will still be
  2126. inaccessable until it is reallocated.
  2127. </p>
  2128. </div>
  2129. </div>
  2130. </div>
  2131. <div class="CVariable">
  2132. <div class="CTopic">
  2133. <h3 class="CTitle">
  2134. <a name="_DUMA_Slot.DUMA_MAX_ALLOC"></a>DUMA_MAX_ALLOC
  2135. </h3>
  2136. <div class="CBody">
  2137. <blockquote>
  2138. <table
  2139. border="0"
  2140. cellspacing="0"
  2141. cellpadding="0"
  2142. class="Prototype"
  2143. >
  2144. <tr>
  2145. <td>static long DUMA_MAX_ALLOC</td>
  2146. </tr>
  2147. </table>
  2148. </blockquote>
  2149. <p class="CParagraph">
  2150. DUMA_MAX_ALLOC is used to control the maximum memory print of
  2151. the program in total: When the sum of allocated and protected
  2152. memory would exceed this value in kB, the protected memory is
  2153. freed/deleted.
  2154. </p>
  2155. </div>
  2156. </div>
  2157. </div>
  2158. <div class="CVariable">
  2159. <div class="CTopic">
  2160. <h3 class="CTitle">
  2161. <a name="_DUMA_Slot.DUMA_ALLOW_MALLOC_0"></a>DUMA_ALLOW_MALLOC_0
  2162. </h3>
  2163. <div class="CBody">
  2164. <blockquote>
  2165. <table
  2166. border="0"
  2167. cellspacing="0"
  2168. cellpadding="0"
  2169. class="Prototype"
  2170. >
  2171. <tr>
  2172. <td>static int DUMA_ALLOW_MALLOC_0</td>
  2173. </tr>
  2174. </table>
  2175. </blockquote>
  2176. <p class="CParagraph">
  2177. DUMA_ALLOW_MALLOC_0 is set if DUMA is to allow
  2178. malloc(0).&nbsp; I trap malloc(0) by default because it is a
  2179. common source of bugs.&nbsp; But you should know the
  2180. allocation with size 0 is ANSI conform.
  2181. </p>
  2182. </div>
  2183. </div>
  2184. </div>
  2185. <div class="CVariable">
  2186. <div class="CTopic">
  2187. <h3 class="CTitle">
  2188. <a name="_DUMA_Slot.DUMA_MALLOC_FAILEXIT"></a
  2189. >DUMA_MALLOC_FAILEXIT
  2190. </h3>
  2191. <div class="CBody">
  2192. <blockquote>
  2193. <table
  2194. border="0"
  2195. cellspacing="0"
  2196. cellpadding="0"
  2197. class="Prototype"
  2198. >
  2199. <tr>
  2200. <td>static int DUMA_MALLOC_FAILEXIT</td>
  2201. </tr>
  2202. </table>
  2203. </blockquote>
  2204. <p class="CParagraph">
  2205. DUMA_MALLOC_FAILEXIT controls the behaviour of DUMA when
  2206. malloc() fails and would return NULL.&nbsp; But most
  2207. applications don&rsquo;t check the return value for errors ...
  2208. so default to Exit on Fail
  2209. </p>
  2210. </div>
  2211. </div>
  2212. </div>
  2213. <div class="CVariable">
  2214. <div class="CTopic">
  2215. <h3 class="CTitle">
  2216. <a name="_DUMA_Slot.DUMA_FREE_ACCESS"></a>DUMA_FREE_ACCESS
  2217. </h3>
  2218. <div class="CBody">
  2219. <blockquote>
  2220. <table
  2221. border="0"
  2222. cellspacing="0"
  2223. cellpadding="0"
  2224. class="Prototype"
  2225. >
  2226. <tr>
  2227. <td>static int DUMA_FREE_ACCESS</td>
  2228. </tr>
  2229. </table>
  2230. </blockquote>
  2231. <p class="CParagraph">
  2232. DUMA_FREE_ACCESS is set if DUMA is to write access memory
  2233. before freeing it.&nbsp; This makes easier using watch
  2234. expressions in debuggers as the process is interrupted even if
  2235. the memory is going to be freed.
  2236. </p>
  2237. </div>
  2238. </div>
  2239. </div>
  2240. <div class="CVariable">
  2241. <div class="CTopic">
  2242. <h3 class="CTitle">
  2243. <a name="_DUMA_Slot.DUMA_SHOW_ALLOC"></a>DUMA_SHOW_ALLOC
  2244. </h3>
  2245. <div class="CBody">
  2246. <blockquote>
  2247. <table
  2248. border="0"
  2249. cellspacing="0"
  2250. cellpadding="0"
  2251. class="Prototype"
  2252. >
  2253. <tr>
  2254. <td>static int DUMA_SHOW_ALLOC</td>
  2255. </tr>
  2256. </table>
  2257. </blockquote>
  2258. <p class="CParagraph">
  2259. DUMA_SHOW_ALLOC is set if DUMA is to print all allocations and
  2260. deallocations to the console.&nbsp; Although this generates a
  2261. lot of messages, the option can be useful to detect
  2262. inefficient code containing many allocations / deallocations
  2263. </p>
  2264. </div>
  2265. </div>
  2266. </div>
  2267. <div class="CVariable">
  2268. <div class="CTopic">
  2269. <h3 class="CTitle">
  2270. <a name="_DUMA_Slot._duma_allocList"></a>_duma_allocList
  2271. </h3>
  2272. <div class="CBody">
  2273. <blockquote>
  2274. <table
  2275. border="0"
  2276. cellspacing="0"
  2277. cellpadding="0"
  2278. class="Prototype"
  2279. >
  2280. <tr>
  2281. <td>struct _DUMA_Slot * _duma_allocList</td>
  2282. </tr>
  2283. </table>
  2284. </blockquote>
  2285. <p class="CParagraph">
  2286. _DUMA_allocList points to the array of slot structures used to
  2287. manage the malloc arena.
  2288. </p>
  2289. </div>
  2290. </div>
  2291. </div>
  2292. <div class="CVariable">
  2293. <div class="CTopic">
  2294. <h3 class="CTitle">
  2295. <a name="_DUMA_Slot._duma_allocListSize"></a>_duma_allocListSize
  2296. </h3>
  2297. <div class="CBody">
  2298. <blockquote>
  2299. <table
  2300. border="0"
  2301. cellspacing="0"
  2302. cellpadding="0"
  2303. class="Prototype"
  2304. >
  2305. <tr>
  2306. <td>static size_t _duma_allocListSize</td>
  2307. </tr>
  2308. </table>
  2309. </blockquote>
  2310. <p class="CParagraph">
  2311. _duma_allocListSize is the size of the allocation list.&nbsp;
  2312. This will always be a multiple of the page size.
  2313. </p>
  2314. </div>
  2315. </div>
  2316. </div>
  2317. <div class="CVariable">
  2318. <div class="CTopic">
  2319. <h3 class="CTitle">
  2320. <a name="_DUMA_Slot.slotCount"></a>slotCount
  2321. </h3>
  2322. <div class="CBody">
  2323. <blockquote>
  2324. <table
  2325. border="0"
  2326. cellspacing="0"
  2327. cellpadding="0"
  2328. class="Prototype"
  2329. >
  2330. <tr>
  2331. <td>static size_t slotCount</td>
  2332. </tr>
  2333. </table>
  2334. </blockquote>
  2335. <p class="CParagraph">
  2336. slotCount is the number of Slot structures in allocationList.
  2337. </p>
  2338. </div>
  2339. </div>
  2340. </div>
  2341. <div class="CVariable">
  2342. <div class="CTopic">
  2343. <h3 class="CTitle">
  2344. <a name="_DUMA_Slot.unUsedSlots"></a>unUsedSlots
  2345. </h3>
  2346. <div class="CBody">
  2347. <blockquote>
  2348. <table
  2349. border="0"
  2350. cellspacing="0"
  2351. cellpadding="0"
  2352. class="Prototype"
  2353. >
  2354. <tr>
  2355. <td>static size_t unUsedSlots</td>
  2356. </tr>
  2357. </table>
  2358. </blockquote>
  2359. <p class="CParagraph">
  2360. unUsedSlots is the number of Slot structures that are
  2361. currently available to represent new malloc buffers.&nbsp;
  2362. When this number gets too low, we will create new slots.
  2363. </p>
  2364. </div>
  2365. </div>
  2366. </div>
  2367. <div class="CVariable">
  2368. <div class="CTopic">
  2369. <h3 class="CTitle">
  2370. <a name="_DUMA_Slot.slotsPerPage"></a>slotsPerPage
  2371. </h3>
  2372. <div class="CBody">
  2373. <blockquote>
  2374. <table
  2375. border="0"
  2376. cellspacing="0"
  2377. cellpadding="0"
  2378. class="Prototype"
  2379. >
  2380. <tr>
  2381. <td>static size_t slotsPerPage</td>
  2382. </tr>
  2383. </table>
  2384. </blockquote>
  2385. <p class="CParagraph">
  2386. slotsPerPage is the number of slot structures that fit in a
  2387. virtual memory page.
  2388. </p>
  2389. </div>
  2390. </div>
  2391. </div>
  2392. <div class="CVariable">
  2393. <div class="CTopic">
  2394. <h3 class="CTitle">
  2395. <a name="_DUMA_Slot.sumAllocatedMem"></a>sumAllocatedMem
  2396. </h3>
  2397. <div class="CBody">
  2398. <blockquote>
  2399. <table
  2400. border="0"
  2401. cellspacing="0"
  2402. cellpadding="0"
  2403. class="Prototype"
  2404. >
  2405. <tr>
  2406. <td>static long sumAllocatedMem</td>
  2407. </tr>
  2408. </table>
  2409. </blockquote>
  2410. <p class="CParagraph">
  2411. internal variable: sum of allocated -freed +protected memory
  2412. in kB
  2413. </p>
  2414. </div>
  2415. </div>
  2416. </div>
  2417. <div class="CVariable">
  2418. <div class="CTopic">
  2419. <h3 class="CTitle">
  2420. <a name="_DUMA_Slot.sumTotalAllocatedMem"></a
  2421. >sumTotalAllocatedMem
  2422. </h3>
  2423. <div class="CBody">
  2424. <blockquote>
  2425. <table
  2426. border="0"
  2427. cellspacing="0"
  2428. cellpadding="0"
  2429. class="Prototype"
  2430. >
  2431. <tr>
  2432. <td>static long sumTotalAllocatedMem</td>
  2433. </tr>
  2434. </table>
  2435. </blockquote>
  2436. <p class="CParagraph">
  2437. internal variable: sum of allocated memory in kB
  2438. </p>
  2439. </div>
  2440. </div>
  2441. </div>
  2442. <div class="CVariable">
  2443. <div class="CTopic">
  2444. <h3 class="CTitle">
  2445. <a name="_DUMA_Slot.sumProtectedMem"></a>sumProtectedMem
  2446. </h3>
  2447. <div class="CBody">
  2448. <blockquote>
  2449. <table
  2450. border="0"
  2451. cellspacing="0"
  2452. cellpadding="0"
  2453. class="Prototype"
  2454. >
  2455. <tr>
  2456. <td>static long sumProtectedMem</td>
  2457. </tr>
  2458. </table>
  2459. </blockquote>
  2460. <p class="CParagraph">
  2461. internal variable: sum of protected memory in kB
  2462. </p>
  2463. </div>
  2464. </div>
  2465. </div>
  2466. <div class="CVariable">
  2467. <div class="CTopic">
  2468. <h3 class="CTitle">
  2469. <a name="_DUMA_Slot.numDeallocs"></a>numDeallocs
  2470. </h3>
  2471. <div class="CBody">
  2472. <blockquote>
  2473. <table
  2474. border="0"
  2475. cellspacing="0"
  2476. cellpadding="0"
  2477. class="Prototype"
  2478. >
  2479. <tr>
  2480. <td>static long numDeallocs</td>
  2481. </tr>
  2482. </table>
  2483. </blockquote>
  2484. <p class="CParagraph">
  2485. internal variable: number of deallocations processed so far
  2486. </p>
  2487. </div>
  2488. </div>
  2489. </div>
  2490. <div class="CVariable">
  2491. <div class="CTopic">
  2492. <h3 class="CTitle">
  2493. <a name="_DUMA_Slot.numAllocs"></a>numAllocs
  2494. </h3>
  2495. <div class="CBody">
  2496. <blockquote>
  2497. <table
  2498. border="0"
  2499. cellspacing="0"
  2500. cellpadding="0"
  2501. class="Prototype"
  2502. >
  2503. <tr>
  2504. <td>static long numAllocs</td>
  2505. </tr>
  2506. </table>
  2507. </blockquote>
  2508. <p class="CParagraph">
  2509. internal variable: number of allocations processed so far
  2510. </p>
  2511. </div>
  2512. </div>
  2513. </div>
  2514. <div class="CVariable">
  2515. <div class="CTopic">
  2516. <h3 class="CTitle">
  2517. <a name="_DUMA_Slot.duma_init_done"></a>duma_init_done
  2518. </h3>
  2519. <div class="CBody">
  2520. <p class="CParagraph">
  2521. internal variable: state of initialization
  2522. </p>
  2523. </div>
  2524. </div>
  2525. </div>
  2526. <div class="CGroup">
  2527. <div class="CTopic">
  2528. <h3 class="CTitle">
  2529. <a name="_DUMA_Slot.Functions"></a>Functions
  2530. </h3>
  2531. </div>
  2532. </div>
  2533. <div class="CFunction">
  2534. <div class="CTopic">
  2535. <h3 class="CTitle">
  2536. <a name="_DUMA_Slot._duma_assert"></a>_duma_assert
  2537. </h3>
  2538. <div class="CBody">
  2539. <blockquote>
  2540. <table
  2541. border="0"
  2542. cellspacing="0"
  2543. cellpadding="0"
  2544. class="Prototype"
  2545. >
  2546. <tr>
  2547. <td>
  2548. <table border="0" cellspacing="0" cellpadding="0">
  2549. <tr>
  2550. <td class="PBeforeParameters" nowrap>
  2551. void _duma_assert(
  2552. </td>
  2553. <td class="PTypePrefix" nowrap>const&nbsp;</td>
  2554. <td class="PType" nowrap>char&nbsp;</td>
  2555. <td class="PParameterPrefix" nowrap>*</td>
  2556. <td class="PParameter" nowrap>exprstr,</td>
  2557. </tr>
  2558. <tr>
  2559. <td></td>
  2560. <td class="PTypePrefix" nowrap>const&nbsp;</td>
  2561. <td class="PType" nowrap>char&nbsp;</td>
  2562. <td class="PParameterPrefix" nowrap>*</td>
  2563. <td class="PParameter" nowrap>filename,</td>
  2564. </tr>
  2565. <tr>
  2566. <td></td>
  2567. <td class="PTypePrefix" nowrap></td>
  2568. <td class="PType" nowrap>int&nbsp;</td>
  2569. <td class="PParameterPrefix" nowrap></td>
  2570. <td class="PParameter" nowrap>lineno</td>
  2571. <td class="PAfterParameters" nowrap>)</td>
  2572. </tr>
  2573. </table>
  2574. </td>
  2575. </tr>
  2576. </table>
  2577. </blockquote>
  2578. <p class="CParagraph">
  2579. Print message and halt program execution in crazy way.
  2580. </p>
  2581. </div>
  2582. </div>
  2583. </div>
  2584. <div class="CFunction">
  2585. <div class="CTopic">
  2586. <h3 class="CTitle">
  2587. <a name="_DUMA_Slot.duma_init"></a>duma_init
  2588. </h3>
  2589. <div class="CBody">
  2590. <blockquote>
  2591. <table
  2592. border="0"
  2593. cellspacing="0"
  2594. cellpadding="0"
  2595. class="Prototype"
  2596. >
  2597. <tr>
  2598. <td>
  2599. <table border="0" cellspacing="0" cellpadding="0">
  2600. <tr>
  2601. <td class="PBeforeParameters" nowrap>
  2602. void duma_init(
  2603. </td>
  2604. <td class="PParameter" nowrap>void</td>
  2605. <td class="PAfterParameters" nowrap>)</td>
  2606. </tr>
  2607. </table>
  2608. </td>
  2609. </tr>
  2610. </table>
  2611. </blockquote>
  2612. <p class="CParagraph">
  2613. duma_init sets configuration settings.&nbsp; Can sometimes
  2614. cause problems when called from _duma_init.
  2615. </p>
  2616. <p class="CParagraph">
  2617. See Also:
  2618. <a
  2619. href="#_DUMA_Slot._duma_init"
  2620. class="LFunction"
  2621. id="link56"
  2622. onMouseOver="ShowTip(event, 'tt24', 'link56')"
  2623. onMouseOut="HideTip('tt24')"
  2624. >_duma_init</a
  2625. >
  2626. </p>
  2627. </div>
  2628. </div>
  2629. </div>
  2630. <div class="CFunction">
  2631. <div class="CTopic">
  2632. <h3 class="CTitle">
  2633. <a name="_DUMA_Slot._duma_init"></a>_duma_init
  2634. </h3>
  2635. <div class="CBody">
  2636. <blockquote>
  2637. <table
  2638. border="0"
  2639. cellspacing="0"
  2640. cellpadding="0"
  2641. class="Prototype"
  2642. >
  2643. <tr>
  2644. <td>
  2645. <table border="0" cellspacing="0" cellpadding="0">
  2646. <tr>
  2647. <td class="PBeforeParameters" nowrap>
  2648. void _duma_init(
  2649. </td>
  2650. <td class="PParameter" nowrap>void</td>
  2651. <td class="PAfterParameters" nowrap>)</td>
  2652. </tr>
  2653. </table>
  2654. </td>
  2655. </tr>
  2656. </table>
  2657. </blockquote>
  2658. <p class="CParagraph">
  2659. _duma_init sets up the memory allocation arena and the
  2660. run-time configuration information.&nbsp; We will call
  2661. duma_init unless DUMA_EXPLICIT_INIT is defined at compile
  2662. time.
  2663. </p>
  2664. <p class="CParagraph">
  2665. See Also:
  2666. <a
  2667. href="#_DUMA_Slot.duma_init"
  2668. class="LFunction"
  2669. id="link57"
  2670. onMouseOver="ShowTip(event, 'tt23', 'link57')"
  2671. onMouseOut="HideTip('tt23')"
  2672. >duma_init</a
  2673. >
  2674. </p>
  2675. </div>
  2676. </div>
  2677. </div>
  2678. <div class="CFunction">
  2679. <div class="CTopic">
  2680. <h3 class="CTitle">
  2681. <a name="_DUMA_Slot.allocateMoreSlots"></a>allocateMoreSlots
  2682. </h3>
  2683. <div class="CBody">
  2684. <blockquote>
  2685. <table
  2686. border="0"
  2687. cellspacing="0"
  2688. cellpadding="0"
  2689. class="Prototype"
  2690. >
  2691. <tr>
  2692. <td>
  2693. <table border="0" cellspacing="0" cellpadding="0">
  2694. <tr>
  2695. <td class="PBeforeParameters" nowrap>
  2696. static void allocateMoreSlots(
  2697. </td>
  2698. <td class="PParameter" nowrap>void</td>
  2699. <td class="PAfterParameters" nowrap>)</td>
  2700. </tr>
  2701. </table>
  2702. </td>
  2703. </tr>
  2704. </table>
  2705. </blockquote>
  2706. <p class="CParagraph">
  2707. allocateMoreSlots is called when there are only enough slot
  2708. structures left to support the allocation of a single malloc
  2709. buffer.
  2710. </p>
  2711. <p class="CParagraph">
  2712. See Also:
  2713. <a
  2714. href="#_DUMA_Slot._duma_allocate"
  2715. class="LFunction"
  2716. id="link58"
  2717. onMouseOver="ShowTip(event, 'tt26', 'link58')"
  2718. onMouseOut="HideTip('tt26')"
  2719. >_duma_allocate</a
  2720. >
  2721. </p>
  2722. </div>
  2723. </div>
  2724. </div>
  2725. <div class="CFunction">
  2726. <div class="CTopic">
  2727. <h3 class="CTitle">
  2728. <a name="_DUMA_Slot._duma_allocate"></a>_duma_allocate
  2729. </h3>
  2730. <div class="CBody">
  2731. <blockquote>
  2732. <table
  2733. border="0"
  2734. cellspacing="0"
  2735. cellpadding="0"
  2736. class="Prototype"
  2737. >
  2738. <tr>
  2739. <td>
  2740. <table border="0" cellspacing="0" cellpadding="0">
  2741. <tr>
  2742. <td class="PBeforeParameters" nowrap>
  2743. void * _duma_allocate(
  2744. </td>
  2745. <td class="PTypePrefix" nowrap></td>
  2746. <td class="PType" nowrap>size_t&nbsp;</td>
  2747. <td class="PParameter" nowrap>alignment,</td>
  2748. </tr>
  2749. <tr>
  2750. <td></td>
  2751. <td class="PTypePrefix" nowrap></td>
  2752. <td class="PType" nowrap>size_t&nbsp;</td>
  2753. <td class="PParameter" nowrap>userSize,</td>
  2754. </tr>
  2755. <tr>
  2756. <td></td>
  2757. <td class="PTypePrefix" nowrap></td>
  2758. <td class="PType" nowrap>int&nbsp;</td>
  2759. <td class="PParameter" nowrap>protectBelow,</td>
  2760. </tr>
  2761. <tr>
  2762. <td></td>
  2763. <td class="PTypePrefix" nowrap></td>
  2764. <td class="PType" nowrap>int&nbsp;</td>
  2765. <td class="PParameter" nowrap>fillByte,</td>
  2766. </tr>
  2767. <tr>
  2768. <td></td>
  2769. <td class="PTypePrefix" nowrap></td>
  2770. <td class="PType" nowrap>int&nbsp;</td>
  2771. <td class="PParameter" nowrap>protectAllocList,</td>
  2772. </tr>
  2773. <tr>
  2774. <td></td>
  2775. <td class="PTypePrefix" nowrap>enum&nbsp;</td>
  2776. <td class="PType" nowrap>_DUMA_Allocator&nbsp;</td>
  2777. <td class="PParameter" nowrap>allocator,</td>
  2778. </tr>
  2779. <tr>
  2780. <td></td>
  2781. <td class="PTypePrefix" nowrap>
  2782. enum _DUMA_FailReturn&nbsp;
  2783. </td>
  2784. <td class="PType" nowrap>fail&nbsp;</td>
  2785. <td class="PParameter" nowrap>DUMA_PARAMLIST_FL</td>
  2786. <td class="PAfterParameters" nowrap>)</td>
  2787. </tr>
  2788. </table>
  2789. </td>
  2790. </tr>
  2791. </table>
  2792. </blockquote>
  2793. <p class="CParagraph">
  2794. This is the memory allocator.&nbsp; When asked to allocate a
  2795. buffer, allocate it in such a way that the end of the buffer
  2796. is followed by an inaccessable memory page.&nbsp; If software
  2797. overruns that buffer, it will touch the bad page and get an
  2798. immediate segmentation fault.&nbsp; It&rsquo;s then easy to
  2799. zero in on the offending code with a debugger.
  2800. </p>
  2801. <p class="CParagraph">
  2802. There are a few complications.&nbsp; If the user asks for an
  2803. odd-sized buffer, we would have to have that buffer start on
  2804. an odd address if the byte after the end of the buffer was to
  2805. be on the inaccessable page.&nbsp; Unfortunately, there is
  2806. lots of software that asks for odd-sized buffers and then
  2807. requires that the returned address be word-aligned, or the
  2808. size of the buffer be a multiple of the word size.&nbsp; An
  2809. example are the string-processing functions on Sun systems,
  2810. which do word references to the string memory and may refer to
  2811. memory up to three bytes beyond the end of the string.&nbsp;
  2812. For this reason, I take the alignment requests to memalign()
  2813. and valloc() seriously, and
  2814. </p>
  2815. <p class="CParagraph">DUMA wastes lots of memory.</p>
  2816. <p class="CParagraph">
  2817. See Also:
  2818. <a
  2819. href="#_DUMA_Slot._duma_deallocate"
  2820. class="LFunction"
  2821. id="link59"
  2822. onMouseOver="ShowTip(event, 'tt27', 'link59')"
  2823. onMouseOut="HideTip('tt27')"
  2824. >_duma_deallocate</a
  2825. >
  2826. </p>
  2827. </div>
  2828. </div>
  2829. </div>
  2830. <div class="CFunction">
  2831. <div class="CTopic">
  2832. <h3 class="CTitle">
  2833. <a name="_DUMA_Slot._duma_deallocate"></a>_duma_deallocate
  2834. </h3>
  2835. <div class="CBody">
  2836. <blockquote>
  2837. <table
  2838. border="0"
  2839. cellspacing="0"
  2840. cellpadding="0"
  2841. class="Prototype"
  2842. >
  2843. <tr>
  2844. <td>
  2845. <table border="0" cellspacing="0" cellpadding="0">
  2846. <tr>
  2847. <td class="PBeforeParameters" nowrap>
  2848. void _duma_deallocate(
  2849. </td>
  2850. <td class="PTypePrefix" nowrap></td>
  2851. <td class="PType" nowrap>void&nbsp;</td>
  2852. <td class="PParameterPrefix" nowrap>*</td>
  2853. <td class="PParameter" nowrap>address,</td>
  2854. </tr>
  2855. <tr>
  2856. <td></td>
  2857. <td class="PTypePrefix" nowrap></td>
  2858. <td class="PType" nowrap>int&nbsp;</td>
  2859. <td class="PParameterPrefix" nowrap></td>
  2860. <td class="PParameter" nowrap>protectAllocList,</td>
  2861. </tr>
  2862. <tr>
  2863. <td></td>
  2864. <td class="PTypePrefix" nowrap>
  2865. enum _DUMA_Allocator&nbsp;
  2866. </td>
  2867. <td class="PType" nowrap>allocator&nbsp;</td>
  2868. <td class="PParameterPrefix" nowrap></td>
  2869. <td class="PParameter" nowrap>DUMA_PARAMLIST_FL</td>
  2870. <td class="PAfterParameters" nowrap>)</td>
  2871. </tr>
  2872. </table>
  2873. </td>
  2874. </tr>
  2875. </table>
  2876. </blockquote>
  2877. <p class="CParagraph">
  2878. Deallocate allocated memory after running some checks, then
  2879. open slot for use.&nbsp; Uses Page_Delete to free the
  2880. underlying memory.
  2881. </p>
  2882. <p class="CParagraph">
  2883. See Also:
  2884. <a
  2885. href="paging-h.html#Page_Delete"
  2886. class="LFunction"
  2887. id="link60"
  2888. onMouseOver="ShowTip(event, 'tt29', 'link60')"
  2889. onMouseOut="HideTip('tt29')"
  2890. >Page_Delete</a
  2891. >
  2892. <a
  2893. href="#_DUMA_Slot._duma_allocate"
  2894. class="LFunction"
  2895. id="link61"
  2896. onMouseOver="ShowTip(event, 'tt26', 'link61')"
  2897. onMouseOut="HideTip('tt26')"
  2898. >_duma_allocate</a
  2899. >
  2900. </p>
  2901. </div>
  2902. </div>
  2903. </div>
  2904. <div class="CFunction">
  2905. <div class="CTopic">
  2906. <h3 class="CTitle">
  2907. <a name="_DUMA_Slot._duma_kmalloc"></a>_duma_kmalloc
  2908. </h3>
  2909. <div class="CBody">
  2910. <blockquote>
  2911. <table
  2912. border="0"
  2913. cellspacing="0"
  2914. cellpadding="0"
  2915. class="Prototype"
  2916. >
  2917. <tr>
  2918. <td>
  2919. <table border="0" cellspacing="0" cellpadding="0">
  2920. <tr>
  2921. <td class="PBeforeParameters" nowrap>
  2922. void * _duma_kmalloc(
  2923. </td>
  2924. <td class="PTypePrefix" nowrap></td>
  2925. <td class="PType" nowrap>size_t&nbsp;</td>
  2926. <td class="PParameter" nowrap>size,</td>
  2927. </tr>
  2928. <tr>
  2929. <td></td>
  2930. <td class="PTypePrefix" nowrap>int&nbsp;</td>
  2931. <td class="PType" nowrap>flags&nbsp;</td>
  2932. <td class="PParameter" nowrap>DUMA_PARAMLIST_FL</td>
  2933. <td class="PAfterParameters" nowrap>)</td>
  2934. </tr>
  2935. </table>
  2936. </td>
  2937. </tr>
  2938. </table>
  2939. </blockquote>
  2940. <p class="CParagraph">A version of kmalloc.</p>
  2941. </div>
  2942. </div>
  2943. </div>
  2944. </td>
  2945. </tr>
  2946. </table>
  2947. <div class="Footer">
  2948. <!--START_ND_FOOTER-->Generated by
  2949. <a href="http://www.naturaldocs.org">Natural Docs</a
  2950. ><!--END_ND_FOOTER-->
  2951. </div>
  2952. <!--START_ND_TOOLTIPS-->
  2953. <div class="CToolTip" id="tt1">
  2954. <div class="CVariable">
  2955. <blockquote>
  2956. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  2957. <tr>
  2958. <td>static const char version[]</td>
  2959. </tr>
  2960. </table>
  2961. </blockquote>
  2962. KDUMA version string
  2963. </div>
  2964. </div>
  2965. <div class="CToolTip" id="tt2">
  2966. <div class="CVariable">
  2967. <blockquote>
  2968. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  2969. <tr>
  2970. <td>size_t DUMA_ALIGNMENT</td>
  2971. </tr>
  2972. </table>
  2973. </blockquote>
  2974. DUMA_ALIGNMENT is a global variable used to control the default
  2975. alignment of buffers returned by malloc(), calloc(), and realloc().
  2976. </div>
  2977. </div>
  2978. <div class="CToolTip" id="tt3">
  2979. <div class="CVariable">
  2980. <blockquote>
  2981. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  2982. <tr>
  2983. <td>int DUMA_PROTECT_BELOW</td>
  2984. </tr>
  2985. </table>
  2986. </blockquote>
  2987. DUMA_PROTECT_BELOW is used to modify the behavior of the allocator.
  2988. </div>
  2989. </div>
  2990. <div class="CToolTip" id="tt4">
  2991. <div class="CVariable">
  2992. <blockquote>
  2993. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  2994. <tr>
  2995. <td>int DUMA_FILL</td>
  2996. </tr>
  2997. </table>
  2998. </blockquote>
  2999. DUMA_FILL is set to 0-255 if DUMA should fill all new allocated memory
  3000. with the specified value.
  3001. </div>
  3002. </div>
  3003. <div class="CToolTip" id="tt5">
  3004. <div class="CVariable">
  3005. <blockquote>
  3006. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3007. <tr>
  3008. <td>static int DUMA_SLACKFILL</td>
  3009. </tr>
  3010. </table>
  3011. </blockquote>
  3012. DUMA_SLACKFILL is set to 0-255.
  3013. </div>
  3014. </div>
  3015. <div class="CToolTip" id="tt6">
  3016. <div class="CVariable">
  3017. <blockquote>
  3018. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3019. <tr>
  3020. <td>static long DUMA_PROTECT_FREE</td>
  3021. </tr>
  3022. </table>
  3023. </blockquote>
  3024. DUMA_PROTECT_FREE is used to control the disposition of memory that is
  3025. released using free().
  3026. </div>
  3027. </div>
  3028. <div class="CToolTip" id="tt7">
  3029. <div class="CVariable">
  3030. <blockquote>
  3031. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3032. <tr>
  3033. <td>static long DUMA_MAX_ALLOC</td>
  3034. </tr>
  3035. </table>
  3036. </blockquote>
  3037. DUMA_MAX_ALLOC is used to control the maximum memory print of the
  3038. program in total: When the sum of allocated and protected memory would
  3039. exceed this value in kB, the protected memory is freed/deleted.
  3040. </div>
  3041. </div>
  3042. <div class="CToolTip" id="tt8">
  3043. <div class="CVariable">
  3044. <blockquote>
  3045. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3046. <tr>
  3047. <td>static int DUMA_ALLOW_MALLOC_0</td>
  3048. </tr>
  3049. </table>
  3050. </blockquote>
  3051. DUMA_ALLOW_MALLOC_0 is set if DUMA is to allow malloc(0).
  3052. </div>
  3053. </div>
  3054. <div class="CToolTip" id="tt9">
  3055. <div class="CVariable">
  3056. <blockquote>
  3057. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3058. <tr>
  3059. <td>static int DUMA_MALLOC_FAILEXIT</td>
  3060. </tr>
  3061. </table>
  3062. </blockquote>
  3063. DUMA_MALLOC_FAILEXIT controls the behaviour of DUMA when malloc() fails
  3064. and would return NULL.
  3065. </div>
  3066. </div>
  3067. <div class="CToolTip" id="tt10">
  3068. <div class="CVariable">
  3069. <blockquote>
  3070. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3071. <tr>
  3072. <td>static int DUMA_FREE_ACCESS</td>
  3073. </tr>
  3074. </table>
  3075. </blockquote>
  3076. DUMA_FREE_ACCESS is set if DUMA is to write access memory before freeing
  3077. it.
  3078. </div>
  3079. </div>
  3080. <div class="CToolTip" id="tt11">
  3081. <div class="CVariable">
  3082. <blockquote>
  3083. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3084. <tr>
  3085. <td>static int DUMA_SHOW_ALLOC</td>
  3086. </tr>
  3087. </table>
  3088. </blockquote>
  3089. DUMA_SHOW_ALLOC is set if DUMA is to print all allocations and
  3090. deallocations to the console.
  3091. </div>
  3092. </div>
  3093. <div class="CToolTip" id="tt12">
  3094. <div class="CVariable">
  3095. <blockquote>
  3096. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3097. <tr>
  3098. <td>struct _DUMA_Slot * _duma_allocList</td>
  3099. </tr>
  3100. </table>
  3101. </blockquote>
  3102. _DUMA_allocList points to the array of slot structures used to manage
  3103. the malloc arena.
  3104. </div>
  3105. </div>
  3106. <div class="CToolTip" id="tt13">
  3107. <div class="CVariable">
  3108. <blockquote>
  3109. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3110. <tr>
  3111. <td>static size_t _duma_allocListSize</td>
  3112. </tr>
  3113. </table>
  3114. </blockquote>
  3115. _duma_allocListSize is the size of the allocation list.
  3116. </div>
  3117. </div>
  3118. <div class="CToolTip" id="tt14">
  3119. <div class="CVariable">
  3120. <blockquote>
  3121. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3122. <tr>
  3123. <td>static size_t slotCount</td>
  3124. </tr>
  3125. </table>
  3126. </blockquote>
  3127. slotCount is the number of Slot structures in allocationList.
  3128. </div>
  3129. </div>
  3130. <div class="CToolTip" id="tt15">
  3131. <div class="CVariable">
  3132. <blockquote>
  3133. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3134. <tr>
  3135. <td>static size_t unUsedSlots</td>
  3136. </tr>
  3137. </table>
  3138. </blockquote>
  3139. unUsedSlots is the number of Slot structures that are currently
  3140. available to represent new malloc buffers.
  3141. </div>
  3142. </div>
  3143. <div class="CToolTip" id="tt16">
  3144. <div class="CVariable">
  3145. <blockquote>
  3146. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3147. <tr>
  3148. <td>static size_t slotsPerPage</td>
  3149. </tr>
  3150. </table>
  3151. </blockquote>
  3152. slotsPerPage is the number of slot structures that fit in a virtual
  3153. memory page.
  3154. </div>
  3155. </div>
  3156. <div class="CToolTip" id="tt17">
  3157. <div class="CVariable">
  3158. <blockquote>
  3159. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3160. <tr>
  3161. <td>static long sumAllocatedMem</td>
  3162. </tr>
  3163. </table>
  3164. </blockquote>
  3165. internal variable: sum of allocated -freed +protected memory in kB
  3166. </div>
  3167. </div>
  3168. <div class="CToolTip" id="tt18">
  3169. <div class="CVariable">
  3170. <blockquote>
  3171. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3172. <tr>
  3173. <td>static long sumTotalAllocatedMem</td>
  3174. </tr>
  3175. </table>
  3176. </blockquote>
  3177. internal variable: sum of allocated memory in kB
  3178. </div>
  3179. </div>
  3180. <div class="CToolTip" id="tt19">
  3181. <div class="CVariable">
  3182. <blockquote>
  3183. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3184. <tr>
  3185. <td>static long sumProtectedMem</td>
  3186. </tr>
  3187. </table>
  3188. </blockquote>
  3189. internal variable: sum of protected memory in kB
  3190. </div>
  3191. </div>
  3192. <div class="CToolTip" id="tt20">
  3193. <div class="CVariable">
  3194. <blockquote>
  3195. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3196. <tr>
  3197. <td>static long numDeallocs</td>
  3198. </tr>
  3199. </table>
  3200. </blockquote>
  3201. internal variable: number of deallocations processed so far
  3202. </div>
  3203. </div>
  3204. <div class="CToolTip" id="tt21">
  3205. <div class="CVariable">
  3206. <blockquote>
  3207. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3208. <tr>
  3209. <td>static long numAllocs</td>
  3210. </tr>
  3211. </table>
  3212. </blockquote>
  3213. internal variable: number of allocations processed so far
  3214. </div>
  3215. </div>
  3216. <div class="CToolTip" id="tt22">
  3217. <div class="CFunction">
  3218. <blockquote>
  3219. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3220. <tr>
  3221. <td>
  3222. <table border="0" cellspacing="0" cellpadding="0">
  3223. <tr>
  3224. <td class="PBeforeParameters" nowrap>void _duma_assert(</td>
  3225. <td class="PTypePrefix" nowrap>const&nbsp;</td>
  3226. <td class="PType" nowrap>char&nbsp;</td>
  3227. <td class="PParameterPrefix" nowrap>*</td>
  3228. <td class="PParameter" nowrap>exprstr,</td>
  3229. </tr>
  3230. <tr>
  3231. <td></td>
  3232. <td class="PTypePrefix" nowrap>const&nbsp;</td>
  3233. <td class="PType" nowrap>char&nbsp;</td>
  3234. <td class="PParameterPrefix" nowrap>*</td>
  3235. <td class="PParameter" nowrap>filename,</td>
  3236. </tr>
  3237. <tr>
  3238. <td></td>
  3239. <td class="PTypePrefix" nowrap></td>
  3240. <td class="PType" nowrap>int&nbsp;</td>
  3241. <td class="PParameterPrefix" nowrap></td>
  3242. <td class="PParameter" nowrap>lineno</td>
  3243. <td class="PAfterParameters" nowrap>)</td>
  3244. </tr>
  3245. </table>
  3246. </td>
  3247. </tr>
  3248. </table>
  3249. </blockquote>
  3250. Print message and halt program execution in crazy way.
  3251. </div>
  3252. </div>
  3253. <div class="CToolTip" id="tt23">
  3254. <div class="CFunction">
  3255. <blockquote>
  3256. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3257. <tr>
  3258. <td>
  3259. <table border="0" cellspacing="0" cellpadding="0">
  3260. <tr>
  3261. <td class="PBeforeParameters" nowrap>void duma_init(</td>
  3262. <td class="PParameter" nowrap>void</td>
  3263. <td class="PAfterParameters" nowrap>)</td>
  3264. </tr>
  3265. </table>
  3266. </td>
  3267. </tr>
  3268. </table>
  3269. </blockquote>
  3270. duma_init sets configuration settings.
  3271. </div>
  3272. </div>
  3273. <div class="CToolTip" id="tt24">
  3274. <div class="CFunction">
  3275. <blockquote>
  3276. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3277. <tr>
  3278. <td>
  3279. <table border="0" cellspacing="0" cellpadding="0">
  3280. <tr>
  3281. <td class="PBeforeParameters" nowrap>void _duma_init(</td>
  3282. <td class="PParameter" nowrap>void</td>
  3283. <td class="PAfterParameters" nowrap>)</td>
  3284. </tr>
  3285. </table>
  3286. </td>
  3287. </tr>
  3288. </table>
  3289. </blockquote>
  3290. _duma_init sets up the memory allocation arena and the run-time
  3291. configuration information.
  3292. </div>
  3293. </div>
  3294. <div class="CToolTip" id="tt25">
  3295. <div class="CFunction">
  3296. <blockquote>
  3297. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3298. <tr>
  3299. <td>
  3300. <table border="0" cellspacing="0" cellpadding="0">
  3301. <tr>
  3302. <td class="PBeforeParameters" nowrap>
  3303. static void allocateMoreSlots(
  3304. </td>
  3305. <td class="PParameter" nowrap>void</td>
  3306. <td class="PAfterParameters" nowrap>)</td>
  3307. </tr>
  3308. </table>
  3309. </td>
  3310. </tr>
  3311. </table>
  3312. </blockquote>
  3313. allocateMoreSlots is called when there are only enough slot structures
  3314. left to support the allocation of a single malloc buffer.
  3315. </div>
  3316. </div>
  3317. <div class="CToolTip" id="tt26">
  3318. <div class="CFunction">
  3319. <blockquote>
  3320. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3321. <tr>
  3322. <td>
  3323. <table border="0" cellspacing="0" cellpadding="0">
  3324. <tr>
  3325. <td class="PBeforeParameters" nowrap>
  3326. void * _duma_allocate(
  3327. </td>
  3328. <td class="PTypePrefix" nowrap></td>
  3329. <td class="PType" nowrap>size_t&nbsp;</td>
  3330. <td class="PParameter" nowrap>alignment,</td>
  3331. </tr>
  3332. <tr>
  3333. <td></td>
  3334. <td class="PTypePrefix" nowrap></td>
  3335. <td class="PType" nowrap>size_t&nbsp;</td>
  3336. <td class="PParameter" nowrap>userSize,</td>
  3337. </tr>
  3338. <tr>
  3339. <td></td>
  3340. <td class="PTypePrefix" nowrap></td>
  3341. <td class="PType" nowrap>int&nbsp;</td>
  3342. <td class="PParameter" nowrap>protectBelow,</td>
  3343. </tr>
  3344. <tr>
  3345. <td></td>
  3346. <td class="PTypePrefix" nowrap></td>
  3347. <td class="PType" nowrap>int&nbsp;</td>
  3348. <td class="PParameter" nowrap>fillByte,</td>
  3349. </tr>
  3350. <tr>
  3351. <td></td>
  3352. <td class="PTypePrefix" nowrap></td>
  3353. <td class="PType" nowrap>int&nbsp;</td>
  3354. <td class="PParameter" nowrap>protectAllocList,</td>
  3355. </tr>
  3356. <tr>
  3357. <td></td>
  3358. <td class="PTypePrefix" nowrap>enum&nbsp;</td>
  3359. <td class="PType" nowrap>_DUMA_Allocator&nbsp;</td>
  3360. <td class="PParameter" nowrap>allocator,</td>
  3361. </tr>
  3362. <tr>
  3363. <td></td>
  3364. <td class="PTypePrefix" nowrap>
  3365. enum _DUMA_FailReturn&nbsp;
  3366. </td>
  3367. <td class="PType" nowrap>fail&nbsp;</td>
  3368. <td class="PParameter" nowrap>DUMA_PARAMLIST_FL</td>
  3369. <td class="PAfterParameters" nowrap>)</td>
  3370. </tr>
  3371. </table>
  3372. </td>
  3373. </tr>
  3374. </table>
  3375. </blockquote>
  3376. This is the memory allocator.
  3377. </div>
  3378. </div>
  3379. <div class="CToolTip" id="tt27">
  3380. <div class="CFunction">
  3381. <blockquote>
  3382. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3383. <tr>
  3384. <td>
  3385. <table border="0" cellspacing="0" cellpadding="0">
  3386. <tr>
  3387. <td class="PBeforeParameters" nowrap>
  3388. void _duma_deallocate(
  3389. </td>
  3390. <td class="PTypePrefix" nowrap></td>
  3391. <td class="PType" nowrap>void&nbsp;</td>
  3392. <td class="PParameterPrefix" nowrap>*</td>
  3393. <td class="PParameter" nowrap>address,</td>
  3394. </tr>
  3395. <tr>
  3396. <td></td>
  3397. <td class="PTypePrefix" nowrap></td>
  3398. <td class="PType" nowrap>int&nbsp;</td>
  3399. <td class="PParameterPrefix" nowrap></td>
  3400. <td class="PParameter" nowrap>protectAllocList,</td>
  3401. </tr>
  3402. <tr>
  3403. <td></td>
  3404. <td class="PTypePrefix" nowrap>
  3405. enum _DUMA_Allocator&nbsp;
  3406. </td>
  3407. <td class="PType" nowrap>allocator&nbsp;</td>
  3408. <td class="PParameterPrefix" nowrap></td>
  3409. <td class="PParameter" nowrap>DUMA_PARAMLIST_FL</td>
  3410. <td class="PAfterParameters" nowrap>)</td>
  3411. </tr>
  3412. </table>
  3413. </td>
  3414. </tr>
  3415. </table>
  3416. </blockquote>
  3417. Deallocate allocated memory after running some checks, then open slot
  3418. for use.
  3419. </div>
  3420. </div>
  3421. <div class="CToolTip" id="tt28">
  3422. <div class="CFunction">
  3423. <blockquote>
  3424. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3425. <tr>
  3426. <td>
  3427. <table border="0" cellspacing="0" cellpadding="0">
  3428. <tr>
  3429. <td class="PBeforeParameters" nowrap>
  3430. void * _duma_kmalloc(
  3431. </td>
  3432. <td class="PTypePrefix" nowrap></td>
  3433. <td class="PType" nowrap>size_t&nbsp;</td>
  3434. <td class="PParameter" nowrap>size,</td>
  3435. </tr>
  3436. <tr>
  3437. <td></td>
  3438. <td class="PTypePrefix" nowrap>int&nbsp;</td>
  3439. <td class="PType" nowrap>flags&nbsp;</td>
  3440. <td class="PParameter" nowrap>DUMA_PARAMLIST_FL</td>
  3441. <td class="PAfterParameters" nowrap>)</td>
  3442. </tr>
  3443. </table>
  3444. </td>
  3445. </tr>
  3446. </table>
  3447. </blockquote>
  3448. A version of kmalloc.
  3449. </div>
  3450. </div>
  3451. <div class="CToolTip" id="tt29">
  3452. <div class="CFunction">
  3453. <blockquote>
  3454. <table border="0" cellspacing="0" cellpadding="0" class="Prototype">
  3455. <tr>
  3456. <td>
  3457. <table border="0" cellspacing="0" cellpadding="0">
  3458. <tr>
  3459. <td class="PBeforeParameters" nowrap>
  3460. static void Page_Delete(
  3461. </td>
  3462. <td class="PType" nowrap>void&nbsp;</td>
  3463. <td class="PParameterPrefix" nowrap>*</td>
  3464. <td class="PParameter" nowrap>address,</td>
  3465. </tr>
  3466. <tr>
  3467. <td></td>
  3468. <td class="PType" nowrap>size_t&nbsp;</td>
  3469. <td class="PParameterPrefix" nowrap></td>
  3470. <td class="PParameter" nowrap>size</td>
  3471. <td class="PAfterParameters" nowrap>)</td>
  3472. </tr>
  3473. </table>
  3474. </td>
  3475. </tr>
  3476. </table>
  3477. </blockquote>
  3478. Free&rsquo;s DUMA allocated memory.
  3479. </div>
  3480. </div>
  3481. <!--END_ND_TOOLTIPS-->
  3482. <script language="JavaScript">
  3483. <!--
  3484. if (browserType) {
  3485. if (browserVer) {
  3486. document.write("</div>");
  3487. }
  3488. document.write("</div>");
  3489. } // -->
  3490. </script>
  3491. </body>
  3492. </html>