[10207] | 1 | <!-- Do not edit with Front Page, it adds too many spaces -->
|
---|
| 2 | <html>
|
---|
| 3 | <head>
|
---|
| 4 | <meta http-equiv="Content-Type"
|
---|
| 5 | content="text/html; charset=iso-8859-1">
|
---|
| 6 | <title>mem.c -- memory operations</title>
|
---|
| 7 | </head>
|
---|
| 8 |
|
---|
| 9 | <body>
|
---|
| 10 | <!-- Navigation links -->
|
---|
| 11 | <p><a name="TOP"><b>Up:</b></a> <a
|
---|
| 12 | href="http://www.qhull.org">Home page</a> for Qhull<br>
|
---|
| 13 | <b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual</a>: Table of Contents <br>
|
---|
| 14 | <b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
|
---|
| 15 | • <a href="../../html/qh-quick.htm#options">Options</a>
|
---|
| 16 | • <a href="../../html/qh-opto.htm#output">Output</a>
|
---|
| 17 | • <a href="../../html/qh-optf.htm#format">Formats</a>
|
---|
| 18 | • <a href="../../html/qh-optg.htm#geomview">Geomview</a>
|
---|
| 19 | • <a href="../../html/qh-optp.htm#print">Print</a>
|
---|
| 20 | • <a href="../../html/qh-optq.htm#qhull">Qhull</a>
|
---|
| 21 | • <a href="../../html/qh-optc.htm#prec">Precision</a>
|
---|
| 22 | • <a href="../../html/qh-optt.htm#trace">Trace</a><br>
|
---|
| 23 | <b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a><br>
|
---|
| 24 | <b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
|
---|
| 25 | <b>To:</b> <a href="qh-geom.htm">Geom</a> • <a href="qh-globa.htm">Global</a>
|
---|
| 26 | • <a href="qh-io.htm">Io</a> • <a href="qh-mem.htm#TOC">Mem</a>
|
---|
| 27 | • <a href="qh-merge.htm">Merge</a> • <a href="qh-poly.htm">Poly</a>
|
---|
| 28 | • <a href="qh-qhull.htm">Qhull</a> • <a href="qh-set.htm">Set</a>
|
---|
| 29 | • <a href="qh-stat.htm">Stat</a> • <a href="qh-user.htm">User</a>
|
---|
| 30 | </p>
|
---|
| 31 | <hr>
|
---|
| 32 |
|
---|
| 33 | <h2>mem.c -- memory operations</h2>
|
---|
| 34 | <blockquote>
|
---|
| 35 | <p>Qhull uses quick-fit memory allocation. It maintains a
|
---|
| 36 | set of free lists for a variety of small allocations. A
|
---|
| 37 | small request returns a block from the best fitting free
|
---|
| 38 | list. If the free list is empty, Qhull allocates a block
|
---|
| 39 | from a reserved buffer. </p>
|
---|
| 40 | <p>Use 'T5' to trace memory allocations.</p>
|
---|
| 41 |
|
---|
| 42 | </blockquote>
|
---|
| 43 | <p><b>Copyright © 1995-2012 C.B. Barber</b></p>
|
---|
| 44 | <hr>
|
---|
| 45 | <p><a href="#TOP">»</a> <a href="qh-geom.htm#TOC">Geom</a>
|
---|
| 46 | <a name="TOC">•</a> <a href="qh-globa.htm#TOC">Global</a> •
|
---|
| 47 | <a href="qh-io.htm#TOC">Io</a> • <b>Mem</b>
|
---|
| 48 | • <a href="qh-merge.htm#TOC">Merge</a> • <a href="qh-poly.htm#TOC">Poly</a>
|
---|
| 49 | • <a href="qh-qhull.htm#TOC">Qhull</a> • <a href="qh-set.htm#TOC">Set</a>
|
---|
| 50 | • <a href="qh-stat.htm#TOC">Stat</a> • <a href="qh-user.htm#TOC">User</a>
|
---|
| 51 | </p>
|
---|
| 52 | <h3>Index to <a href="mem.c">mem.c</a> and
|
---|
| 53 | <a href="mem.h">mem.h</a></h3>
|
---|
| 54 | <ul>
|
---|
| 55 | <li><a href="#etype">mem.h data types</a> </li>
|
---|
| 56 | <li><a href="#emacro">mem.h macros</a> </li>
|
---|
| 57 | <li><a href="#efunc">User level functions</a> </li>
|
---|
| 58 | </ul>
|
---|
| 59 | <h3><a href="qh-mem.htm#TOC">»</a><a name="etype">mem.h data types and constants</a></h3>
|
---|
| 60 | <ul>
|
---|
| 61 | <li><a href="mem.h#ptr_intT">ptr_intT</a> for casting
|
---|
| 62 | a void* to an integer-type </li>
|
---|
| 63 | <li><a href="mem.h#qhmemT">qhmemT</a> global memory
|
---|
| 64 | structure for mem.c </li>
|
---|
| 65 | <li><a href="mem.h#NOmem">qh_NOmem</a> disable memory allocation</li>
|
---|
| 66 | </ul>
|
---|
| 67 | <h3><a href="qh-mem.htm#TOC">»</a><a name="emacro">mem.h macros</a></h3>
|
---|
| 68 | <ul>
|
---|
| 69 | <li><a href="mem.h#memalloc_">qh_memalloc_</a>
|
---|
| 70 | allocate memory</li>
|
---|
| 71 | <li><a href="mem.h#memfree_">qh_memfree_</a> free
|
---|
| 72 | memory</li>
|
---|
| 73 | </ul>
|
---|
| 74 | <h3><a href="qh-mem.htm#TOC">»</a><a name="efunc">User level
|
---|
| 75 | functions</a></h3>
|
---|
| 76 | <ul>
|
---|
| 77 | <li><a href="mem.c#memalloc">qh_memalloc</a> allocate
|
---|
| 78 | memory </li>
|
---|
| 79 | <li><a href="mem.c#memfree">qh_memfree</a> free
|
---|
| 80 | memory </li>
|
---|
| 81 | <li><a href="mem.c#meminit">qh_meminit</a> initialize
|
---|
| 82 | memory </li>
|
---|
| 83 | <li><a href="mem.c#memstatistics">qh_memstatistics</a>
|
---|
| 84 | print memory statistics </li>
|
---|
| 85 | <li><a href="mem.c#meminit">qh_memtotlong</a> return total, allocated long memory</li>
|
---|
| 86 | <li><a href="mem.c#NOmem">qh_NOmem</a> allocation routines with malloc() and free()
|
---|
| 87 | </ul>
|
---|
| 88 |
|
---|
| 89 | <h3><a href="qh-mem.htm#TOC">»</a><a name="m">Initialization and
|
---|
| 90 | termination functions</a></h3>
|
---|
| 91 | <ul>
|
---|
| 92 | <li><a href="mem.c#intcompare">qh_intcompare</a> used by
|
---|
| 93 | qsort and bsearch to compare two integers </li>
|
---|
| 94 | <li><a href="mem.c#memfreeshort">qh_memfreeshort</a>
|
---|
| 95 | frees up all short and qhmem memory allocations </li>
|
---|
| 96 | <li><a href="mem.c#meminit">qh_meminit</a> initialize
|
---|
| 97 | memory </li>
|
---|
| 98 | <li><a href="mem.c#meminitbuffers">qh_meminitbuffers</a>
|
---|
| 99 | initialize qhmem </li>
|
---|
| 100 | <li><a href="mem.c#memsetup">qh_memsetup</a> set up
|
---|
| 101 | memory after running memsize() </li>
|
---|
| 102 | <li><a href="mem.c#memsize">qh_memsize</a> define a free
|
---|
| 103 | list for this size </li>
|
---|
| 104 | <li><a href="mem.c#memstatistics">qh_memstatistics</a>
|
---|
| 105 | print out memory statistics </li>
|
---|
| 106 | </ul>
|
---|
| 107 |
|
---|
| 108 | <p><!-- Navigation links --> </p>
|
---|
| 109 | <hr>
|
---|
| 110 | <p><b>Up:</b>
|
---|
| 111 | <a href="http://www.qhull.org">Home page for
|
---|
| 112 | Qhull</a> <br>
|
---|
| 113 | <b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual: Table of Contents</a> <br>
|
---|
| 114 | <b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
|
---|
| 115 | • <a href="../../html/qh-quick.htm#options">Options</a>
|
---|
| 116 | • <a href="../../html/qh-opto.htm#output">Output</a>
|
---|
| 117 | • <a href="../../html/qh-optf.htm#format">Formats</a>
|
---|
| 118 | • <a href="../../html/qh-optg.htm#geomview">Geomview</a>
|
---|
| 119 | • <a href="../../html/qh-optp.htm#print">Print</a>
|
---|
| 120 | • <a href="../../html/qh-optq.htm#qhull">Qhull</a>
|
---|
| 121 | • <a href="../../html/qh-optc.htm#prec">Precision</a>
|
---|
| 122 | • <a href="../../html/qh-optt.htm#trace">Trace</a><br>
|
---|
| 123 | <b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a> <br>
|
---|
| 124 | <b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
|
---|
| 125 | <b>To:</b> <a href="qh-geom.htm">Geom</a> •
|
---|
| 126 | <a href="qh-globa.htm">Global</a> • <a href="qh-io.htm">Io</a>
|
---|
| 127 | • <a href="qh-mem.htm">Mem</a> • <a href="qh-merge.htm">Merge</a>
|
---|
| 128 | • <a href="qh-poly.htm">Poly</a> • <a href="qh-qhull.htm#TOC">Qhull</a>
|
---|
| 129 | • <a href="qh-set.htm">Set</a> • <a href="qh-stat.htm">Stat</a>
|
---|
| 130 | • <a href="qh-user.htm">User</a><br>
|
---|
| 131 | </p>
|
---|
| 132 | <p><!-- GC common information --> </p>
|
---|
| 133 | <hr>
|
---|
| 134 | <p><a href="http://www.geom.uiuc.edu/"><img
|
---|
| 135 | src="../../html/qh--geom.gif" align="middle" width="40" height="40"></a><i>The
|
---|
| 136 | Geometry Center Home Page </i></p>
|
---|
| 137 | <p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
|
---|
| 138 | </a><br>
|
---|
| 139 | Created: May 2, 1997 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
|
---|
| 140 | </body>
|
---|
| 141 | </html>
|
---|