From 3802e744063ffda043cc1778aec9e29b01513518 Mon Sep 17 00:00:00 2001 From: jthorn Date: Tue, 6 May 2003 12:48:05 +0000 Subject: since I haven't tracked down the infinite memory leak, at least put in a level 1 warning to tell users that they're in trouble: WARNING[L1,P0] (IDAnalyticBH): Misner_init(): warning: about to call fill_iso() ; at present this routine seems to leak quasi-infinite amounts of memory at the rate of O(100 megabytes/second) :( :( :( git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDAnalyticBH/trunk@133 6a3ddf76-46e1-4315-99d9-bc56cac1ef84 --- src/Misner_points.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Misner_points.c b/src/Misner_points.c index a88dc43..3a6fa80 100644 --- a/src/Misner_points.c +++ b/src/Misner_points.c @@ -47,6 +47,11 @@ struct bhole { the number of the seed black hole that was used to isometrize this term. */ int i; + + /* isos points to an array of nbhole (or is it nbhole-1??) + structures, malloc()-ed in fill_iso() . + At present this array is never freed, and in fact the pointers may + be overwritten with other malloc()s in fill_iso() recursive calls! :( */ struct bhole *isos; }; @@ -110,6 +115,12 @@ void Misner_init(int n, CCTK_REAL mu, int terms) bholes[i].isos = 0; } + CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING, +"\n" +" Misner_init(): warning: about to call fill_iso() ; at present\n" +" this routine seems to leak quasi-infinite amounts of\n" +" memory at the rate of O(100 megabytes/second) :( :( :(\n"); + for(i=0;i