<ahref="../../d2/ddd/malloc__dbg_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">/**</span></div>
<divclass="line"><aid="l00003"name="l00003"></a><spanclass="lineno"> 3</span><spanclass="comment"> * @brief Header file that contains macros used to replace malloc/calloc and free.</span></div>
<divclass="line"><aid="l00005"name="l00005"></a><spanclass="lineno"> 5</span><spanclass="comment"> * Macros malloc, calloc and free respectively calls malloc_dbg, calloc_dbg and free_dbg.</span></div>
<divclass="line"><aid="l00006"name="l00006"></a><spanclass="lineno"> 6</span><spanclass="comment"> * malloc_dbg and calloc_dbg allocates memory using the "real" malloc and calloc and store</span></div>
<divclass="line"><aid="l00007"name="l00007"></a><spanclass="lineno"> 7</span><spanclass="comment"> * the pointer returned (with additional informations) in a linked list.</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment"> * Thanks to this linked list, it is possible to check memory leaks.</span></div>
<divclass="line"><aid="l00016"name="l00016"></a><spanclass="lineno"> 16</span><spanclass="comment"> /** This macro replace the standard malloc function with malloc_dbg.</span></div>
<divclass="line"><aid="l00020"name="l00020"></a><spanclass="lineno"> 20</span><spanclass="comment"> /** This macro replace the standard calloc function with calloc_dbg.</span></div>
<divclass="line"><aid="l00024"name="l00024"></a><spanclass="lineno"> 24</span><spanclass="comment"> /** This macro replace the standard free function with free_dbg.</span></div>
<divclass="ttc"id="amalloc__dbg_8h_html_a37914d05ba1fe8848aa1b48cda719422"><divclass="ttname"><ahref="../../d2/ddd/malloc__dbg_8h.html#a37914d05ba1fe8848aa1b48cda719422">malloc_dbg</a></div><divclass="ttdeci">void * malloc_dbg(size_t bytes, int line, const char *filename, const char *functionName)</div><divclass="ttdoc">malloc_dbg function is a wrapper around the malloc function.</div><divclass="ttdef"><b>Definition:</b> malloc_dbg.c:129</div></div>
<divclass="ttc"id="amalloc__dbg_8h_html_a3f9195a04ac8e8a9868ee3e416db7e8c"><divclass="ttname"><ahref="../../d2/ddd/malloc__dbg_8h.html#a3f9195a04ac8e8a9868ee3e416db7e8c">free_dbg</a></div><divclass="ttdeci">void free_dbg(void *ptrToFree)</div><divclass="ttdoc">free_dbg function is used to free the memory allocated to a pointer.</div><divclass="ttdef"><b>Definition:</b> malloc_dbg.c:208</div></div>
<divclass="ttc"id="amalloc__dbg_8h_html_ab07f946b77155ca78d0e14e231a99f5d"><divclass="ttname"><ahref="../../d2/ddd/malloc__dbg_8h.html#ab07f946b77155ca78d0e14e231a99f5d">calloc_dbg</a></div><divclass="ttdeci">void * calloc_dbg(size_t elementCount, size_t elementSize, int line, const char *filename, const char *functionName)</div><divclass="ttdoc">calloc_dbg function is a wrapper around the calloc function.</div><divclass="ttdef"><b>Definition:</b> malloc_dbg.c:174</div></div>
<divclass="ttc"id="amalloc__dbg_8h_html_abfd0a4452069af4cfefe4a5d037e92ef"><divclass="ttname"><ahref="../../d2/ddd/malloc__dbg_8h.html#abfd0a4452069af4cfefe4a5d037e92ef">printLeaks</a></div><divclass="ttdeci">void printLeaks(void)</div><divclass="ttdoc">printLeaks function is used to print all the memory leaks.</div><divclass="ttdef"><b>Definition:</b> malloc_dbg.c:264</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="../../doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.5 </li>