Initial source commit
This commit is contained in:
commit
f1384c11ee
335 changed files with 52715 additions and 0 deletions
57
minorGems/util/development/fortify/test3.cpp
Normal file
57
minorGems/util/development/fortify/test3.cpp
Normal file
|
@ -0,0 +1,57 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "fortify.h"
|
||||
|
||||
|
||||
int main() {
|
||||
//Fortify_EnterScope();
|
||||
|
||||
int *a = new int[ 10 ];
|
||||
|
||||
int i;
|
||||
for( i=0; i<10; i++ ) {
|
||||
|
||||
a[i] = i;
|
||||
|
||||
}
|
||||
|
||||
for( i=0; i<10; i++ ) {
|
||||
|
||||
printf( "a[i] = %d\n", a[i] );
|
||||
|
||||
}
|
||||
|
||||
|
||||
delete [] a;
|
||||
|
||||
for( i=0; i<10; i++ ) {
|
||||
|
||||
printf( "a[i] = %d\n", a[i] );
|
||||
|
||||
}
|
||||
//Fortify_CheckAllMemory();
|
||||
|
||||
for( i=0; i<10; i++ ) {
|
||||
|
||||
a[i] = i;
|
||||
|
||||
}
|
||||
for( i=0; i<10; i++ ) {
|
||||
|
||||
printf( "a[i] = %d\n", a[i] );
|
||||
|
||||
}
|
||||
|
||||
//Fortify_CheckAllMemory();
|
||||
|
||||
int *b = new int[5];
|
||||
|
||||
delete [] b;
|
||||
|
||||
delete [] a;
|
||||
|
||||
//Fortify_LeaveScope();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue