diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/c/memory%2Ffree_aligned_sized.html | |
new repository
Diffstat (limited to 'devdocs/c/memory%2Ffree_aligned_sized.html')
| -rw-r--r-- | devdocs/c/memory%2Ffree_aligned_sized.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/devdocs/c/memory%2Ffree_aligned_sized.html b/devdocs/c/memory%2Ffree_aligned_sized.html new file mode 100644 index 00000000..f4aeba49 --- /dev/null +++ b/devdocs/c/memory%2Ffree_aligned_sized.html @@ -0,0 +1,20 @@ + <h1 id="firstHeading" class="firstHeading">free_aligned_sized</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><stdlib.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c23"> <td> <pre data-language="c">void free_aligned_sized( void* ptr, size_t alignment, size_t size);</pre> +</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c23">(since C23)</span> </td> </tr> </table> <p>If <code>ptr</code> is a null pointer or the result obtained from a call to <code>aligned_alloc</code>, where <code>alignment</code> is equal to the requested allocation alignment and <code>size</code> is equal to the requested allocation size, this function is equivalent to <code><a href="http://en.cppreference.com/w/c/memory/free"><span class="kw406">free</span></a><span class="br0">(</span>ptr<span class="br0">)</span></code>. Otherwise, the behavior is undefined.</p> +<p>Note: The result of an <code><a href="malloc" title="c/memory/malloc">malloc</a></code>, <code><a href="calloc" title="c/memory/calloc">calloc</a></code>, or <code><a href="realloc" title="c/memory/realloc">realloc</a></code> call may not be passed to <code>free_aligned_sized</code>.</p> +<h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> ptr </td> <td> - </td> <td> pointer to the memory to deallocate </td> +</tr> <tr class="t-par"> <td> alignment </td> <td> - </td> <td> alignment of memory to deallocate </td> +</tr> <tr class="t-par"> <td> size </td> <td> - </td> <td> size of memory to deallocate </td> +</tr> +</table> <h3 id="Return_value"> Return value</h3> <p>(none)</p> +<h3 id="Example"> Example</h3> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="aligned_alloc" title="c/memory/aligned alloc"> <span class="t-lines"><span>aligned_alloc</span></span></a></div> +<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> allocates aligned memory <br> <span class="t-mark">(function)</span> </td> +</tr> <tr class="t-dsc"> <td> <div><a href="free" title="c/memory/free"> <span class="t-lines"><span>free</span></span></a></div> </td> <td> deallocates previously allocated memory <br> <span class="t-mark">(function)</span> </td> +</tr> <tr class="t-dsc"> <td> <div><a href="free_sized" title="c/memory/free sized"> <span class="t-lines"><span>free_sized</span></span></a></div> +<div><span class="t-lines"><span><span class="t-mark-rev t-since-c23">(C23)</span></span></span></div> </td> <td> deallocates previously allocated sized memory <br> <span class="t-mark">(function)</span> </td> +</tr> <tr class="t-dsc"> <td> <div><a href="malloc" title="c/memory/malloc"> <span class="t-lines"><span>malloc</span></span></a></div> </td> <td> allocates memory <br> <span class="t-mark">(function)</span> </td> +</tr> </table> <div class="_attribution"> + <p class="_attribution-p"> + © cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br> + <a href="https://en.cppreference.com/w/c/memory/free_aligned_sized" class="_attribution-link">https://en.cppreference.com/w/c/memory/free_aligned_sized</a> + </p> +</div> |
