Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcbor: src/allocators.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libcbor
   &#160;<span id="projectnumber">0.5.0</span>
   </div>
   <div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">allocators.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="allocators_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2017 Pavel Kalvoda &lt;me@pavelkalvoda.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libcbor is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the MIT license. See LICENSE for details.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="common_8h.html">cbor/common.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="common_8h.html#a3218c24af00a3efeaecb1716c8f5a289">   10</a></span>&#160;<a class="code" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a> <a class="code" href="allocators_8c.html#a3218c24af00a3efeaecb1716c8f5a289">_cbor_malloc</a> = malloc;</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="common_8h.html#a84ecc1fc92c3812ab6ced693f2c6254c">   11</a></span>&#160;<a class="code" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a> <a class="code" href="allocators_8c.html#a84ecc1fc92c3812ab6ced693f2c6254c">_cbor_realloc</a> = realloc;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="common_8h.html#a994f4145360ef0bfa3c48e59a5ca7186">   12</a></span>&#160;<a class="code" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a> <a class="code" href="allocators_8c.html#a994f4145360ef0bfa3c48e59a5ca7186">_cbor_free</a> = free;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="common_8h.html#a3f9f1d527374dbb4b48ef3fafa92e0bf">   14</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="allocators_8c.html#a3f9f1d527374dbb4b48ef3fafa92e0bf">cbor_set_allocs</a>(<a class="code" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a> custom_malloc, <a class="code" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a> custom_realloc, <a class="code" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a> custom_free)</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;{</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="allocators_8c.html#a3218c24af00a3efeaecb1716c8f5a289">_cbor_malloc</a> = custom_malloc;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <a class="code" href="allocators_8c.html#a84ecc1fc92c3812ab6ced693f2c6254c">_cbor_realloc</a> = custom_realloc;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <a class="code" href="allocators_8c.html#a994f4145360ef0bfa3c48e59a5ca7186">_cbor_free</a> = custom_free;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;}</div><div class="ttc" id="common_8h_html_af05bb33f6d22cdac535576c8edaf208c"><div class="ttname"><a href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a></div><div class="ttdeci">void(* _cbor_free_t)(void *)</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00063">common.h:63</a></div></div>
<div class="ttc" id="common_8h_html_a5b52369a95930104d33301d12faabe75"><div class="ttname"><a href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a></div><div class="ttdeci">void *(* _cbor_realloc_t)(void *, size_t)</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00062">common.h:62</a></div></div>
<div class="ttc" id="allocators_8c_html_a3218c24af00a3efeaecb1716c8f5a289"><div class="ttname"><a href="allocators_8c.html#a3218c24af00a3efeaecb1716c8f5a289">_cbor_malloc</a></div><div class="ttdeci">_cbor_malloc_t _cbor_malloc</div><div class="ttdef"><b>Definition:</b> <a href="allocators_8c_source.html#l00010">allocators.c:10</a></div></div>
<div class="ttc" id="allocators_8c_html_a84ecc1fc92c3812ab6ced693f2c6254c"><div class="ttname"><a href="allocators_8c.html#a84ecc1fc92c3812ab6ced693f2c6254c">_cbor_realloc</a></div><div class="ttdeci">_cbor_realloc_t _cbor_realloc</div><div class="ttdef"><b>Definition:</b> <a href="allocators_8c_source.html#l00011">allocators.c:11</a></div></div>
<div class="ttc" id="common_8h_html_ad89d15c2e3f18e8914fcdffe4d725d42"><div class="ttname"><a href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a></div><div class="ttdeci">void *(* _cbor_malloc_t)(size_t)</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00061">common.h:61</a></div></div>
<div class="ttc" id="common_8h_html"><div class="ttname"><a href="common_8h.html">common.h</a></div></div>
<div class="ttc" id="allocators_8c_html_a3f9f1d527374dbb4b48ef3fafa92e0bf"><div class="ttname"><a href="allocators_8c.html#a3f9f1d527374dbb4b48ef3fafa92e0bf">cbor_set_allocs</a></div><div class="ttdeci">void cbor_set_allocs(_cbor_malloc_t custom_malloc, _cbor_realloc_t custom_realloc, _cbor_free_t custom_free)</div><div class="ttdoc">Sets the memory management routines to use. </div><div class="ttdef"><b>Definition:</b> <a href="allocators_8c_source.html#l00014">allocators.c:14</a></div></div>
<div class="ttc" id="allocators_8c_html_a994f4145360ef0bfa3c48e59a5ca7186"><div class="ttname"><a href="allocators_8c.html#a994f4145360ef0bfa3c48e59a5ca7186">_cbor_free</a></div><div class="ttdeci">_cbor_free_t _cbor_free</div><div class="ttdef"><b>Definition:</b> <a href="allocators_8c_source.html#l00012">allocators.c:12</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 6 2017 00:26:19 for libcbor by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>