Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0b420d0fce195cf4115dc6a3be5c2da2 > files > 74

sphinxbase-devel-0.7-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SphinxBase: include/sphinxbase/ckd_alloc.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SphinxBase&#160;<span id="projectnumber">0.6</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('ckd__alloc_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>include/sphinxbase/ckd_alloc.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Sphinx's memory allocation/deallocation routines.  
<a href="#_details">More...</a></p>
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;setjmp.h&gt;</code><br/>
<code>#include &lt;sphinxbase/sphinxbase_export.h&gt;</code><br/>
<code>#include &lt;sphinxbase/prim_type.h&gt;</code><br/>
</div>
<p><a href="ckd__alloc_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#aa00ef21903bc4f8a972488417adc8d2e">ckd_calloc</a>(n, sz)&#160;&#160;&#160;__ckd_calloc__((n),(sz),__FILE__,__LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macros to simplify the use of above functions.  <a href="#aa00ef21903bc4f8a972488417adc8d2e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e89a31c3c70710a8e023a177084bff2"></a><!-- doxytag: member="ckd_alloc.h::ckd_malloc" ref="a8e89a31c3c70710a8e023a177084bff2" args="(sz)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a8e89a31c3c70710a8e023a177084bff2">ckd_malloc</a>(sz)&#160;&#160;&#160;__ckd_malloc__((sz),__FILE__,__LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_malloc__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd496738b3e114bd494c5a0955f1bfb3"></a><!-- doxytag: member="ckd_alloc.h::ckd_realloc" ref="afd496738b3e114bd494c5a0955f1bfb3" args="(ptr, sz)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#afd496738b3e114bd494c5a0955f1bfb3">ckd_realloc</a>(ptr, sz)&#160;&#160;&#160;__ckd_realloc__(ptr,(sz),__FILE__,__LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_realloc__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad313f92478859f9e4ea99d0f6e78c393"></a><!-- doxytag: member="ckd_alloc.h::ckd_salloc" ref="ad313f92478859f9e4ea99d0f6e78c393" args="(ptr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#ad313f92478859f9e4ea99d0f6e78c393">ckd_salloc</a>(ptr)&#160;&#160;&#160;__ckd_salloc__(ptr,__FILE__,__LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_salloc__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a949e7b50fcd9697b1563fa57f50e9c4f"></a><!-- doxytag: member="ckd_alloc.h::ckd_calloc_2d" ref="a949e7b50fcd9697b1563fa57f50e9c4f" args="(d1, d2, sz)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a949e7b50fcd9697b1563fa57f50e9c4f">ckd_calloc_2d</a>(d1, d2, sz)&#160;&#160;&#160;__ckd_calloc_2d__((d1),(d2),(sz),__FILE__,__LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_calloc_2d__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af716d69c9fbde1d8b2678da9c260ddc7"></a><!-- doxytag: member="ckd_alloc.h::ckd_calloc_3d" ref="af716d69c9fbde1d8b2678da9c260ddc7" args="(d1, d2, d3, sz)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#af716d69c9fbde1d8b2678da9c260ddc7">ckd_calloc_3d</a>(d1, d2, d3, sz)&#160;&#160;&#160;__ckd_calloc_3d__((d1),(d2),(d3),(sz),__FILE__,__LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_calloc_3d__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5364600029b5bd488e41f29d6c5ffb11"></a><!-- doxytag: member="ckd_alloc.h::ckd_calloc_4d" ref="a5364600029b5bd488e41f29d6c5ffb11" args="(d1, d2, d3, d4, s)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a5364600029b5bd488e41f29d6c5ffb11">ckd_calloc_4d</a>(d1, d2, d3, d4, s)&#160;&#160;&#160;__ckd_calloc_4d__((d1), (d2), (d3), (d4), (s), __FILE__, __LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_calloc_4d__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad5d0dce212e97207af42803a3add00e1"></a><!-- doxytag: member="ckd_alloc.h::ckd_alloc_2d_ptr" ref="ad5d0dce212e97207af42803a3add00e1" args="(d1, d2, bf, sz)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#ad5d0dce212e97207af42803a3add00e1">ckd_alloc_2d_ptr</a>(d1, d2, bf, sz)&#160;&#160;&#160;__ckd_alloc_2d_ptr((d1), (d2), (bf), (sz), __FILE__, __LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_alloc_2d_ptr__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0afe1152d34da544602e6ab1635e05b1"></a><!-- doxytag: member="ckd_alloc.h::ckd_free_2d_ptr" ref="a0afe1152d34da544602e6ab1635e05b1" args="(bf)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a0afe1152d34da544602e6ab1635e05b1">ckd_free_2d_ptr</a>(bf)&#160;&#160;&#160;ckd_free(bf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Free only the pointer arrays allocated with <a class="el" href="ckd__alloc_8h.html#ad5d0dce212e97207af42803a3add00e1" title="Macro for __ckd_alloc_2d_ptr__.">ckd_alloc_2d_ptr()</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab29a3fbbd58bc59aa2827eaeda090d06"></a><!-- doxytag: member="ckd_alloc.h::ckd_alloc_3d_ptr" ref="ab29a3fbbd58bc59aa2827eaeda090d06" args="(d1, d2, d3, bf, sz)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#ab29a3fbbd58bc59aa2827eaeda090d06">ckd_alloc_3d_ptr</a>(d1, d2, d3, bf, sz)&#160;&#160;&#160;__ckd_alloc_3d_ptr((d1), (d2), (d3), (bf), (sz), __FILE__, __LINE__)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro for __ckd_alloc_3d_ptr__. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af03a0583f358dbee5200910d151b490e"></a><!-- doxytag: member="ckd_alloc.h::ckd_free_3d_ptr" ref="af03a0583f358dbee5200910d151b490e" args="(bf)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#af03a0583f358dbee5200910d151b490e">ckd_free_3d_ptr</a>(bf)&#160;&#160;&#160;ckd_free_2d(bf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Free only the pointer arrays allocated with <a class="el" href="ckd__alloc_8h.html#ab29a3fbbd58bc59aa2827eaeda090d06" title="Macro for __ckd_alloc_3d_ptr__.">ckd_alloc_3d_ptr()</a>. <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">jmp_buf *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a0ec6d92241b1912b10f59519d553acb9">ckd_set_jump</a> (jmp_buf *env, int abort)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Control behaviour of the program when allocation fails.  <a href="#a0ec6d92241b1912b10f59519d553acb9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab81dfe13d2237c64182f06f66fab7b0e"></a><!-- doxytag: member="ckd_alloc.h::ckd_fail" ref="ab81dfe13d2237c64182f06f66fab7b0e" args="(char *format,...)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#ab81dfe13d2237c64182f06f66fab7b0e">ckd_fail</a> (char *format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fail (with a message) according to behaviour specified by <a class="el" href="ckd__alloc_8h.html#a0ec6d92241b1912b10f59519d553acb9" title="Control behaviour of the program when allocation fails.">ckd_set_jump()</a>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a903aef4c99a8f19b555a34c9e31c61f8"></a><!-- doxytag: member="ckd_alloc.h::__ckd_calloc__" ref="a903aef4c99a8f19b555a34c9e31c61f8" args="(size_t n_elem, size_t elem_size, const char *caller_file, int caller_line)" -->
SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><b>__ckd_calloc__</b> (size_t n_elem, size_t elem_size, const char *caller_file, int caller_line)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a861f3b9f9730dd87a1dfaf3be2218fd0"></a><!-- doxytag: member="ckd_alloc.h::__ckd_malloc__" ref="a861f3b9f9730dd87a1dfaf3be2218fd0" args="(size_t size, const char *caller_file, int caller_line)" -->
SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><b>__ckd_malloc__</b> (size_t size, const char *caller_file, int caller_line)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a138dd425d0b3329aa214597cb3bd62bd"></a><!-- doxytag: member="ckd_alloc.h::__ckd_realloc__" ref="a138dd425d0b3329aa214597cb3bd62bd" args="(void *ptr, size_t new_size, const char *caller_file, int caller_line)" -->
SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><b>__ckd_realloc__</b> (void *ptr, size_t new_size, const char *caller_file, int caller_line)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad92dae54c994a4f90c842e42d05c494a"></a><!-- doxytag: member="ckd_alloc.h::__ckd_salloc__" ref="ad92dae54c994a4f90c842e42d05c494a" args="(const char *origstr, const char *caller_file, int caller_line)" -->
SPHINXBASE_EXPORT char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#ad92dae54c994a4f90c842e42d05c494a">__ckd_salloc__</a> (const char *origstr, const char *caller_file, int caller_line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Like strdup, except that if an error occurs it prints a diagnostic message and exits. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a141713f7d0ac99eac338d6d8ae35b771">__ckd_calloc_2d__</a> (size_t d1, size_t d2, size_t elemsize, const char *caller_file, int caller_line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a 2-D array and return ptr to it (ie, ptr to vector of ptrs).  <a href="#a141713f7d0ac99eac338d6d8ae35b771"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a19c770c65f642488f6045c442f53fc0c">__ckd_calloc_3d__</a> (size_t d1, size_t d2, size_t d3, size_t elemsize, const char *caller_file, int caller_line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a 3-D array and return ptr to it.  <a href="#a19c770c65f642488f6045c442f53fc0c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT void ****&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a7881d3a852b82336f644f504453bb839">__ckd_calloc_4d__</a> (size_t d1, size_t d2, size_t d3, size_t d4, size_t elem_size, char *caller_file, int caller_line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate a 34D array and return ptr to it.  <a href="#a7881d3a852b82336f644f504453bb839"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af9a3ef2d363ee6a53429427d1d9327a6"></a><!-- doxytag: member="ckd_alloc.h::__ckd_alloc_3d_ptr" ref="af9a3ef2d363ee6a53429427d1d9327a6" args="(size_t d1, size_t d2, size_t d3, void *store, size_t elem_size, char *caller_file, int caller_line)" -->
SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#af9a3ef2d363ee6a53429427d1d9327a6">__ckd_alloc_3d_ptr</a> (size_t d1, size_t d2, size_t d3, void *store, size_t elem_size, char *caller_file, int caller_line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Overlay a 3-D array over a previously allocated storage area. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a965f553ee64bbfbeda048d43393ae04b"></a><!-- doxytag: member="ckd_alloc.h::__ckd_alloc_2d_ptr" ref="a965f553ee64bbfbeda048d43393ae04b" args="(size_t d1, size_t d2, void *store, size_t elem_size, char *caller_file, int caller_line)" -->
SPHINXBASE_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a965f553ee64bbfbeda048d43393ae04b">__ckd_alloc_2d_ptr</a> (size_t d1, size_t d2, void *store, size_t elem_size, char *caller_file, int caller_line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Overlay a s-D array over a previously allocated storage area. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31c6b405558620ac37599737b5722fbf"></a><!-- doxytag: member="ckd_alloc.h::ckd_free" ref="a31c6b405558620ac37599737b5722fbf" args="(void *ptr)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a31c6b405558620ac37599737b5722fbf">ckd_free</a> (void *ptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Test and free a 1-D array. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8246c071ac12e98b7e1df9fe6da15aef"></a><!-- doxytag: member="ckd_alloc.h::ckd_free_2d" ref="a8246c071ac12e98b7e1df9fe6da15aef" args="(void *ptr)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a8246c071ac12e98b7e1df9fe6da15aef">ckd_free_2d</a> (void *ptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a 2-D array (ptr) previously allocated by ckd_calloc_2d. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a443accde4663a4a07c6d147088614d57"></a><!-- doxytag: member="ckd_alloc.h::ckd_free_3d" ref="a443accde4663a4a07c6d147088614d57" args="(void *ptr)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a443accde4663a4a07c6d147088614d57">ckd_free_3d</a> (void *ptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a 3-D array (ptr) previously allocated by ckd_calloc_3d. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2fb0211c16bcbd89d932f383e28b9a7a"></a><!-- doxytag: member="ckd_alloc.h::ckd_free_4d" ref="a2fb0211c16bcbd89d932f383e28b9a7a" args="(void *ptr)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ckd__alloc_8h.html#a2fb0211c16bcbd89d932f383e28b9a7a">ckd_free_4d</a> (void *ptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a 4-D array (ptr) previously allocated by ckd_calloc_4d. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Sphinx's memory allocation/deallocation routines. </p>
<p>Implementation of efficient memory allocation deallocation for multiple dimensional arrays. </p>

<p>Definition in file <a class="el" href="ckd__alloc_8h_source.html">ckd_alloc.h</a>.</p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="aa00ef21903bc4f8a972488417adc8d2e"></a><!-- doxytag: member="ckd_alloc.h::ckd_calloc" ref="aa00ef21903bc4f8a972488417adc8d2e" args="(n, sz)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ckd_calloc</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sz&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__ckd_calloc__((n),(sz),__FILE__,__LINE__)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Macros to simplify the use of above functions. </p>
<p>One should use these, rather than target functions directly. Macro for __ckd_calloc__ </p>

<p>Definition at line <a class="el" href="ckd__alloc_8h_source.html#l00248">248</a> of file <a class="el" href="ckd__alloc_8h_source.html">ckd_alloc.h</a>.</p>

<p>Referenced by <a class="el" href="ckd__alloc_8c_source.html#l00307">__ckd_calloc_4d__()</a>, <a class="el" href="agc_8c_source.html#l00091">agc_init()</a>, <a class="el" href="bio_8c_source.html#l00364">bio_fread_1d()</a>, <a class="el" href="bio_8c_source.html#l00342">bio_fwrite()</a>, <a class="el" href="bio_8c_source.html#l00507">bio_read_wavfile()</a>, <a class="el" href="bio_8c_source.html#l00187">bio_readhdr()</a>, <a class="el" href="pio_8c_source.html#l00484">bit_encode_attach()</a>, <a class="el" href="cmd__ln_8c_source.html#l00710">cmd_ln_init()</a>, <a class="el" href="cmd__ln_8c_source.html#l00765">cmd_ln_parse_file_r()</a>, <a class="el" href="cmd__ln_8c_source.html#l00551">cmd_ln_parse_r()</a>, <a class="el" href="feat_8c_source.html#l00356">feat_array_alloc()</a>, <a class="el" href="feat_8c_source.html#l00689">feat_init()</a>, <a class="el" href="lda_8c_source.html#l00143">feat_lda_transform()</a>, <a class="el" href="feat_8c_source.html#l01153">feat_s2mfc2feat()</a>, <a class="el" href="feat_8c_source.html#l00277">feat_set_subvecs()</a>, <a class="el" href="pio_8c_source.html#l00192">fopen_compchk()</a>, <a class="el" href="glist_8c_source.html#l00110">glist_add_float32()</a>, <a class="el" href="glist_8c_source.html#l00122">glist_add_float64()</a>, <a class="el" href="glist_8c_source.html#l00086">glist_add_int32()</a>, <a class="el" href="glist_8c_source.html#l00074">glist_add_ptr()</a>, <a class="el" href="glist_8c_source.html#l00098">glist_add_uint32()</a>, <a class="el" href="glist_8c_source.html#l00230">glist_insert_float32()</a>, <a class="el" href="glist_8c_source.html#l00244">glist_insert_float64()</a>, <a class="el" href="glist_8c_source.html#l00201">glist_insert_int32()</a>, <a class="el" href="glist_8c_source.html#l00187">glist_insert_ptr()</a>, <a class="el" href="glist_8c_source.html#l00215">glist_insert_uint32()</a>, <a class="el" href="hash__table_8c_source.html#l00652">hash_table_iter()</a>, <a class="el" href="hash__table_8c_source.html#l00158">hash_table_new()</a>, <a class="el" href="heap_8c_source.html#l00113">heap_new()</a>, <a class="el" href="huff__code_8c_source.html#l00229">huff_code_build_int()</a>, <a class="el" href="huff__code_8c_source.html#l00269">huff_code_build_str()</a>, <a class="el" href="huff__code_8c_source.html#l00309">huff_code_read()</a>, <a class="el" href="jsgf_8c_source.html#l00081">jsgf_grammar_new()</a>, <a class="el" href="pio_8c_source.html#l00255">lineiter_start()</a>, <a class="el" href="listelem__alloc_8c_source.html#l00087">listelem_alloc_init()</a>, <a class="el" href="logmath_8c_source.html#l00062">logmath_init()</a>, <a class="el" href="logmath_8c_source.html#l00164">logmath_read()</a>, <a class="el" href="mmio_8c_source.html#l00206">mmio_file_read()</a>, <a class="el" href="ngram__model_8c_source.html#l00702">ngram_iter()</a>, <a class="el" href="ngram__model_8c_source.html#l01000">ngram_model_add_class()</a>, <a class="el" href="ngram__model__set_8c_source.html#l00121">ngram_model_set_init()</a>, <a class="el" href="ngram__model__set_8c_source.html#l00368">ngram_model_set_iter()</a>, <a class="el" href="ngram__model__set_8c_source.html#l00637">ngram_model_set_map_words()</a>, <a class="el" href="ngram__model__set_8c_source.html#l00182">ngram_model_set_read()</a>, <a class="el" href="ngram__model_8c_source.html#l00600">ngram_prob()</a>, <a class="el" href="ngram__model_8c_source.html#l00524">ngram_score()</a>, <a class="el" href="feat_8c_source.html#l00169">parse_subvecs()</a>, <a class="el" href="profile_8c_source.html#l00107">pctr_new()</a>, <a class="el" href="sbthread_8c_source.html#l00611">sbevent_init()</a>, <a class="el" href="sbthread_8c_source.html#l00444">sbmsgq_init()</a>, <a class="el" href="sbthread_8c_source.html#l00671">sbmtx_init()</a>, <a class="el" href="sbthread_8c_source.html#l00406">sbthread_start()</a>, <a class="el" href="strfuncs_8c_source.html#l00062">string_join()</a>, and <a class="el" href="yin_8c_source.html#l00130">yin_init()</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a141713f7d0ac99eac338d6d8ae35b771"></a><!-- doxytag: member="ckd_alloc.h::__ckd_calloc_2d__" ref="a141713f7d0ac99eac338d6d8ae35b771" args="(size_t d1, size_t d2, size_t elemsize, const char *caller_file, int caller_line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPHINXBASE_EXPORT void* __ckd_calloc_2d__ </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>elemsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>caller_file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>caller_line</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate a 2-D array and return ptr to it (ie, ptr to vector of ptrs). </p>
<p>The data area is allocated in one block so it can also be treated as a 1-D array. </p>

<p>Definition at line <a class="el" href="ckd__alloc_8c_source.html#l00220">220</a> of file <a class="el" href="ckd__alloc_8c_source.html">ckd_alloc.c</a>.</p>

<p>References <a class="el" href="ckd__alloc_8c_source.html#l00220">__ckd_calloc_2d__()</a>.</p>

<p>Referenced by <a class="el" href="ckd__alloc_8c_source.html#l00220">__ckd_calloc_2d__()</a>.</p>

</div>
</div>
<a class="anchor" id="a19c770c65f642488f6045c442f53fc0c"></a><!-- doxytag: member="ckd_alloc.h::__ckd_calloc_3d__" ref="a19c770c65f642488f6045c442f53fc0c" args="(size_t d1, size_t d2, size_t d3, size_t elemsize, const char *caller_file, int caller_line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPHINXBASE_EXPORT void* __ckd_calloc_3d__ </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>elemsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>caller_file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>caller_line</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate a 3-D array and return ptr to it. </p>
<p>The data area is allocated in one block so it can also be treated as a 1-D array. </p>

<p>Definition at line <a class="el" href="ckd__alloc_8c_source.html#l00262">262</a> of file <a class="el" href="ckd__alloc_8c_source.html">ckd_alloc.c</a>.</p>

<p>References <a class="el" href="ckd__alloc_8c_source.html#l00262">__ckd_calloc_3d__()</a>.</p>

<p>Referenced by <a class="el" href="ckd__alloc_8c_source.html#l00262">__ckd_calloc_3d__()</a>.</p>

</div>
</div>
<a class="anchor" id="a7881d3a852b82336f644f504453bb839"></a><!-- doxytag: member="ckd_alloc.h::__ckd_calloc_4d__" ref="a7881d3a852b82336f644f504453bb839" args="(size_t d1, size_t d2, size_t d3, size_t d4, size_t elem_size, char *caller_file, int caller_line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPHINXBASE_EXPORT void**** __ckd_calloc_4d__ </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d3</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>d4</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>elem_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>caller_file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>caller_line</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocate a 34D array and return ptr to it. </p>
<p>The data area is allocated in one block so it can also be treated as a 1-D array. </p>

<p>Definition at line <a class="el" href="ckd__alloc_8c_source.html#l00307">307</a> of file <a class="el" href="ckd__alloc_8c_source.html">ckd_alloc.c</a>.</p>

<p>References <a class="el" href="ckd__alloc_8c_source.html#l00307">__ckd_calloc_4d__()</a>, <a class="el" href="ckd__alloc_8h_source.html#l00248">ckd_calloc</a>, and <a class="el" href="err_8h_source.html#l00127">E_FATAL</a>.</p>

<p>Referenced by <a class="el" href="ckd__alloc_8c_source.html#l00307">__ckd_calloc_4d__()</a>.</p>

</div>
</div>
<a class="anchor" id="a0ec6d92241b1912b10f59519d553acb9"></a><!-- doxytag: member="ckd_alloc.h::ckd_set_jump" ref="a0ec6d92241b1912b10f59519d553acb9" args="(jmp_buf *env, int abort)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">jmp_buf* ckd_set_jump </td>
          <td>(</td>
          <td class="paramtype">jmp_buf *&#160;</td>
          <td class="paramname"><em>env</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>abort</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Control behaviour of the program when allocation fails. </p>
<p>Although your program is probably toast when memory allocation fails, it is also probably a good idea to be able to catch these errors and alert the user in some way. Either that, or you might want the program to call abort() so that you can debug the failed code. This function allows you to control that behaviour.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">env</td><td>Pointer to a <code>jmp_buf</code> initialized with setjmp(), or NULL to remove a previously set jump target. </td></tr>
    <tr><td class="paramname">abort</td><td>If non-zero, the program will call abort() when allocation fails rather than exiting or calling longjmp(). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to a previously set <code>jmp_buf</code>, if any. </dd></dl>

<p>Definition at line <a class="el" href="ckd__alloc_8c_source.html#l00109">109</a> of file <a class="el" href="ckd__alloc_8c_source.html">ckd_alloc.c</a>.</p>

<p>References <a class="el" href="ckd__alloc_8c_source.html#l00109">ckd_set_jump()</a>.</p>

<p>Referenced by <a class="el" href="ckd__alloc_8c_source.html#l00109">ckd_set_jump()</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="ckd__alloc_8h.html">ckd_alloc.h</a>      </li>
      <li class="footer">Generated on Tue Apr 19 2011 for SphinxBase by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>