Added malloc debug stuff.
This commit is contained in:
parent
18d87a6650
commit
9d91f7dd88
@ -12,6 +12,8 @@
|
||||
#=============================================================================
|
||||
|
||||
AMG_CC="gcc"
|
||||
AMG_CC_FLAGS="-I/home/casc/include"
|
||||
AMG_CC_DEBUG="-g -DAMG_MALLOC_DEBUG"
|
||||
|
||||
AMG_F77="/home/casc/g77/bin/g77"
|
||||
AMG_F77_FLAGS=""
|
||||
|
||||
@ -29,5 +29,10 @@
|
||||
|
||||
#include "fortran.h"
|
||||
|
||||
/* malloc debug stuff */
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
#include <gmalloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@ -11,6 +11,11 @@
|
||||
#include "timing.h"
|
||||
|
||||
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
/* malloc debug stuff */
|
||||
char amg_malloclog[256];
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Main driver for AMG
|
||||
*--------------------------------------------------------------------------*/
|
||||
@ -50,6 +55,16 @@ char *argv[];
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Set up debugging tools
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
/* malloc debug stuff */
|
||||
malloc_logpath = amg_malloclog;
|
||||
sprintf(malloc_logpath, "malloc.log");
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Set up globals
|
||||
*-------------------------------------------------------*/
|
||||
@ -175,6 +190,13 @@ char *argv[];
|
||||
/*-------------------------------------------------------
|
||||
* Debugging prints
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
/* malloc debug stuff */
|
||||
malloc_verify(0);
|
||||
malloc_shutdown();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
sprintf(file_name, "%s.lastu", GlobalsOutFileName);
|
||||
WriteVec(file_name, u);
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
#=============================================================================
|
||||
|
||||
AMG_CC="gcc"
|
||||
AMG_CC_FLAGS="-I$AMG_DIR/include -I/usr/local/include"
|
||||
AMG_CC_FLAGS="-I$AMG_DIR/include -I/usr/local/include -I/home/casc/include"
|
||||
AMG_CC_DEBUG="-g -DAMG_MALLOC_DEBUG"
|
||||
|
||||
AMG_F77="/home/casc/g77/bin/g77"
|
||||
AMG_F77_FLAGS=""
|
||||
@ -23,4 +24,5 @@ AMG_F90_FLAGS="-silent"
|
||||
|
||||
AMG_LINK="gcc"
|
||||
AMG_LINK_FLAGS="-L${AMG_DIR}/lib -lamg -L$AMG_DIR/lib/cvode -lcvode \
|
||||
-L/usr/local/lib -L/home/casc/g77/lib -lf2c -lm"
|
||||
-L/usr/local/lib -L/home/casc/lib -L/home/casc/g77/lib \
|
||||
-lf2c -lm -lmalloc"
|
||||
|
||||
@ -33,5 +33,10 @@
|
||||
|
||||
#include "protos.h"
|
||||
|
||||
/* malloc debug stuff */
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
#include <gmalloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
#=============================================================================
|
||||
|
||||
AMG_CC="gcc"
|
||||
AMG_CC_FLAGS="-I/home/casc/include"
|
||||
AMG_CC_DEBUG="-g -DAMG_MALLOC_DEBUG"
|
||||
|
||||
AMG_F77="/home/casc/g77/bin/g77"
|
||||
AMG_F77_FLAGS=""
|
||||
|
||||
@ -29,5 +29,10 @@
|
||||
|
||||
#include "fortran.h"
|
||||
|
||||
/* malloc debug stuff */
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
#include <gmalloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@ -11,6 +11,11 @@
|
||||
#include "timing.h"
|
||||
|
||||
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
/* malloc debug stuff */
|
||||
char amg_malloclog[256];
|
||||
#endif
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
* Main driver for AMG
|
||||
*--------------------------------------------------------------------------*/
|
||||
@ -50,6 +55,16 @@ char *argv[];
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Set up debugging tools
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
/* malloc debug stuff */
|
||||
malloc_logpath = amg_malloclog;
|
||||
sprintf(malloc_logpath, "malloc.log");
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------
|
||||
* Set up globals
|
||||
*-------------------------------------------------------*/
|
||||
@ -175,6 +190,13 @@ char *argv[];
|
||||
/*-------------------------------------------------------
|
||||
* Debugging prints
|
||||
*-------------------------------------------------------*/
|
||||
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
/* malloc debug stuff */
|
||||
malloc_verify(0);
|
||||
malloc_shutdown();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
sprintf(file_name, "%s.lastu", GlobalsOutFileName);
|
||||
WriteVec(file_name, u);
|
||||
|
||||
@ -12,7 +12,8 @@
|
||||
#=============================================================================
|
||||
|
||||
AMG_CC="gcc"
|
||||
AMG_CC_FLAGS="-I$AMG_DIR/include -I/usr/local/include"
|
||||
AMG_CC_FLAGS="-I$AMG_DIR/include -I/usr/local/include -I/home/casc/include"
|
||||
AMG_CC_DEBUG="-g -DAMG_MALLOC_DEBUG"
|
||||
|
||||
AMG_F77="/home/casc/g77/bin/g77"
|
||||
AMG_F77_FLAGS=""
|
||||
@ -23,4 +24,5 @@ AMG_F90_FLAGS="-silent"
|
||||
|
||||
AMG_LINK="gcc"
|
||||
AMG_LINK_FLAGS="-L${AMG_DIR}/lib -lamg -L$AMG_DIR/lib/cvode -lcvode \
|
||||
-L/usr/local/lib -L/home/casc/g77/lib -lf2c -lm"
|
||||
-L/usr/local/lib -L/home/casc/lib -L/home/casc/g77/lib \
|
||||
-lf2c -lm -lmalloc"
|
||||
|
||||
@ -33,5 +33,10 @@
|
||||
|
||||
#include "protos.h"
|
||||
|
||||
/* malloc debug stuff */
|
||||
#ifdef AMG_MALLOC_DEBUG
|
||||
#include <gmalloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user