National Instruments 320685D-01 Drums User Manual


 
Chapter 1 LabWindows/CVI Compiler
©
National Instruments Corporation 1-11 LabWindows/CVI Programmer Reference Manual
Dynamic Memory Protection Errors
Dynamic memory protection errors report illegal operations with dynamic memory and
corrupted dynamic memory during allocation and deallocation.
Memory Deallocation (Non-Fatal)
LabWindows/CVI generates memory deallocation errors when the pointer is not the result of
a memory allocation. The following user protection errors involve memory deallocation:
Attempt to free uninitialized pointer
Attempt to free pointer to freed memory
Attempt to free invalid pointer expression
Attempt to free pointer not allocated with
malloc or calloc
Memory Corruption (Fatal)
LabWindows/CVI generates memory corruption errors when a memory
allocation/deallocation detects corrupted memory. During each dynamic memory operation,
LabWindows/CVI verifies the integrity of the memory blocks it uses in the operation. When
you set the Debugging Level to Extended, LabWindows/CVI thoroughly checks all dynamic
memory on each memory operation. LabWindows/CVI generates the following error when it
discovers a problem:
Dynamic memory is corrupt.
General Protection Errors
LabWindows/CVI also checks for stack overflow and missing return values:
Stack overflow (fatal)
Missing return value (non-fatal)
The missing return value error means that a non-void function (one you do not declare with
void return type) returned, but did not returned a value.
Library Protection Errors
Library functions sometimes generate errors when they receive invalid arguments.
LabWindows/CVI error checking is sensitive to the requirements of each library function.
The following errors involve library protection:
Null pointer argument to library function
Uninitialized pointer argument to library function
Passing a pointer to freed memory to a library function
Array argument too small
Passing by reference a scalar argument to a library function that expects an array
00ProRef.book : 06chap01.fm Page 11 Monday, March 9, 1998 3:23 PM