User Guide

  • 2020
  • 09/09/2020
  • Public Content
Contents

Mismatched Allocation/Deallocation

Occurs when a deallocation is attempted with a function that is not the logical reflection of the allocator used.
Problem type: Mismatched allocation/deallocation
ID
Code Location
Description
1
Allocation site
Represents the location and associated call stack from which the memory block was allocated.
2
Deallocation site
Represents the location and associated call stack attempting the deallocation.
char *s = (char*)malloc(5); delete s;
Possible Correction Strategies
Use the appropriate deallocation function to return the memory block to the heap after its last use.
Platform
Memory Allocator
Memory Deallocator
C++ language
new
operator
delete
operator
new[]
operator
delete[]
operator
C language
malloc()
,
calloc()
, or
realloc()
functions
free()
function
Fortran language
allocate()
function
deallocate()
function

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804