<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="C dynamic memory allocation - Page 21 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=C_dynamic_memory_allocation&amp;p=20">1.Previous</a><br />
<a accesskey="3" href="page.php?w=C_dynamic_memory_allocation&amp;p=22">3.Next</a>
</p>
<p>common errors are as follows:;Not checking for allocation failures: Memory allocation is not guaranteed to succeed, and may instead return a null pointer. Using the returned value, without checking if the allocation is successful, invokes <a href="page.php?w=undefined_behavior">undefined behavior</a>. This usually leads to crash (due to the resulting segmentation fault on the null pointer dereference), but there is no guarantee that a crash will happen so relying on that can also lead to problems.;Memory leaks: Failure to deallocate memory using</p><p>
<a accesskey="1" href="page.php?w=C_dynamic_memory_allocation&amp;p=20">1.Previous</a><br />
<a accesskey="3" href="page.php?w=C_dynamic_memory_allocation&amp;p=22">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
