Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 2.03 KB

aligned-free.md

File metadata and controls

50 lines (35 loc) · 2.03 KB
description title ms.date api_name api_location api_type topic_type f1_keywords helpviewer_keywords ms.assetid
Learn more about: _aligned_free
_aligned_free
4/2/2020
_aligned_free
_o__aligned_free
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
api-ms-win-crt-heap-l1-1-0.dll
DLLExport
apiref
aligned_free
_aligned_free
_aligned_free function
aligned_free function
ed1ce952-cdfc-4682-85cc-f75d4101603d

_aligned_free

Frees a block of memory that was allocated with _aligned_malloc or _aligned_offset_malloc.

Syntax

void _aligned_free (
   void *memblock
);

Parameters

memblock
A pointer to the memory block that was returned to the _aligned_malloc or _aligned_offset_malloc function.

Remarks

_aligned_free is marked __declspec(noalias), meaning that the function is guaranteed not to modify global variables. For more information, see noalias.

This function doesn't validate its parameter, unlike the other _aligned CRT functions. If memblock is a NULL pointer, this function simply performs no actions. It doesn't change errno and it doesn't invoke the invalid parameter handler. If an error occurs in the function because _aligned functions weren't used to allocate the block of memory, or a misalignment of memory occurs due to some unforeseen calamity, the function generates a debug report from the _RPT, _RPTF, _RPTW, _RPTFW macros.

By default, this function's global state is scoped to the application. To change this behavior, see Global state in the CRT.

Requirements

Routine Required header
_aligned_free <malloc.h>

Example

For more information, see _aligned_malloc.

See also

Data alignment