diff --git a/qfits/INSTALL b/qfits/INSTALL index 6a03ef0..0020130 100644 --- a/qfits/INSTALL +++ b/qfits/INSTALL @@ -21,7 +21,7 @@ Installing qfits as an ANSI C library % configure --prefix=/usr/local/qfits If you want to perform basic tests, use: - % make tests + % make check Using qfits from C++ diff --git a/qfits/html/index.html b/qfits/html/index.html index 836702d..94a8196 100644 --- a/qfits/html/index.html +++ b/qfits/html/index.html @@ -9,7 +9,7 @@ - +

qfits Reference manual

4.3.3

diff --git a/qfits/html/qfits_h.html b/qfits/html/qfits_h.html index 70c4789..1e0a09b 100644 --- a/qfits/html/qfits_h.html +++ b/qfits/html/qfits_h.html @@ -9,7 +9,7 @@ - +

qfits.h File Reference

diff --git a/qfits/html/qfits_head.html b/qfits/html/qfits_head.html index 7c63a19..b235e6d 100644 --- a/qfits/html/qfits_head.html +++ b/qfits/html/qfits_head.html @@ -9,7 +9,7 @@ - +

qfits.head File Reference


Data Structures

struct  qfits_col
diff --git a/qfits/html/struct_qfits_col.html b/qfits/html/struct_qfits_col.html index 30270ea..9aeed7d 100644 --- a/qfits/html/struct_qfits_col.html +++ b/qfits/html/struct_qfits_col.html @@ -9,7 +9,7 @@ - +

qfits_col Struct Reference

Column object. More...

diff --git a/qfits/html/struct_qfits_header.html b/qfits/html/struct_qfits_header.html index 2b44129..5c1b0fb 100644 --- a/qfits/html/struct_qfits_header.html +++ b/qfits/html/struct_qfits_header.html @@ -9,7 +9,7 @@ - +

qfits_header Struct Reference

FITS header object. More...

diff --git a/qfits/html/struct_qfits_table.html b/qfits/html/struct_qfits_table.html index 4226904..7d9469f 100644 --- a/qfits/html/struct_qfits_table.html +++ b/qfits/html/struct_qfits_table.html @@ -9,7 +9,7 @@ - +

qfits_table Struct Reference

Table object. More...

diff --git a/qfits/html/struct_qfitsdumper.html b/qfits/html/struct_qfitsdumper.html index 37c94bc..eeac39b 100644 --- a/qfits/html/struct_qfitsdumper.html +++ b/qfits/html/struct_qfitsdumper.html @@ -9,7 +9,7 @@ - +

qfitsdumper Struct Reference

qfits dumper control object. More...

diff --git a/qfits/html/struct_qfitsloader.html b/qfits/html/struct_qfitsloader.html index 8568e49..f53cfcd 100644 --- a/qfits/html/struct_qfitsloader.html +++ b/qfits/html/struct_qfitsloader.html @@ -9,7 +9,7 @@ - +

qfitsloader Struct Reference

qfits loader control object. More...

diff --git a/qfits/include/xmemory.h b/qfits/include/xmemory.h index b7c67e6..8943b7f 100644 --- a/qfits/include/xmemory.h +++ b/qfits/include/xmemory.h @@ -3,7 +3,7 @@ @file xmemory.h @author Nicolas Devillard @date Oct 2000 - @version $Revision: 1.19 $ + @version $Revision: 1.20 $ @brief POSIX-compatible extended memory handling. xmemory is a small and efficient module offering memory extension @@ -20,10 +20,10 @@ /*----------------------------------------------------------------------------*/ /* - $Id: xmemory.h,v 1.19 2003/08/13 12:48:56 yjung Exp $ + $Id: xmemory.h,v 1.20 2003/11/05 15:19:09 yjung Exp $ $Author: yjung $ - $Date: 2003/08/13 12:48:56 $ - $Revision: 1.19 $ + $Date: 2003/11/05 15:19:09 $ + $Revision: 1.20 $ */ #ifndef _XMEMORY_H_ diff --git a/qfits/latex/doxygen.sty b/qfits/latex/doxygen.sty index b95cd44..b204b4b 100644 --- a/qfits/latex/doxygen.sty +++ b/qfits/latex/doxygen.sty @@ -12,8 +12,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated at Tue Sep 30 11:31:30 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated at Tue Sep 30 11:31:30 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated at Wed Nov 5 16:04:35 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated at Wed Nov 5 16:04:35 2003 for qfits by Doxygen written by Dimitri van Heesch \copyright~1997-2001}} \cfoot{} \newenvironment{CompactList} {\begin{list}{}{ diff --git a/qfits/src/xmemory.c b/qfits/src/xmemory.c index 7bd66a6..449d95a 100644 --- a/qfits/src/xmemory.c +++ b/qfits/src/xmemory.c @@ -3,7 +3,7 @@ @file xmemory.c @author Nicolas Devillard @date Oct 2000 - @version $Revision: 2.16 $ + @version $Revision: 2.19 $ @brief POSIX-compatible extended memory handling. xmemory is a small and efficient module offering memory extension @@ -20,10 +20,10 @@ /*----------------------------------------------------------------------------*/ /* - $Id: xmemory.c,v 2.16 2003/08/13 12:48:56 yjung Exp $ + $Id: xmemory.c,v 2.19 2003/11/05 15:19:09 yjung Exp $ $Author: yjung $ - $Date: 2003/08/13 12:48:56 $ - $Revision: 2.16 $ + $Date: 2003/11/05 15:19:09 $ + $Revision: 2.19 $ */ /*----------------------------------------------------------------------------- @@ -46,19 +46,20 @@ -----------------------------------------------------------------------------*/ /** - This symbol sets the debug level for the xmemory module. Debug levels - are defined as follows: + This symbol sets the debug level for the xmemory module. Debug levels are + defined as follows: 0 no debugging. - 1 add tracing capabilities for memory leak detection - 2 add diagnostics in xmemory_status - 3 add debug messages + 1 add tracing for memory leaks and diagnostics in xmemory_status + 2 add lots of debug messages */ #ifndef XMEMORY_DEBUG #define XMEMORY_DEBUG 0 #endif /** Initial number of entries in memory table */ +/* In order so ensure good performance, this number should be + somewhat higher that the actual number of pointers used */ #ifndef XMEMORY_MAXPTRS #define XMEMORY_MAXPTRS 8192 #endif @@ -93,12 +94,15 @@ @def xmem_debug @brief Macro to hide away debug code at compile time */ -#if (XMEMORY_DEBUG>=3) +#if (XMEMORY_DEBUG>=2) #define xmem_debug( code ) { code } #else #define xmem_debug( code ) #endif +/* A very simple hash */ +#define PTR_HASH(ptr) (((unsigned long int) ptr) % XMEMORY_MAXPTRS) + /*----------------------------------------------------------------------------- Private variables -----------------------------------------------------------------------------*/ @@ -124,8 +128,6 @@ static char xmemory_tmpdirname[TMPDIRNAMESZ] = "." ; static struct { /** Number of active cells */ int ncells ; - /** Last known empty cell (if any) */ - int freecell ; /** List of pointers (outside of cells for efficiency reason) */ void * pointer[XMEMORY_MAXPTRS] ; /** Memory cells */ @@ -439,7 +441,7 @@ static int xmemory_addcell( int swapfd, char * mm_filename) { - int pos ; + int pos, ii ; /* Check there is still some space left */ if (xmemory_table.ncells >= XMEMORY_MAXPTRS) { @@ -448,19 +450,14 @@ static int xmemory_addcell( exit(-1); } /* Find an available slot */ - if (xmemory_table.freecell>=0) { - pos = xmemory_table.freecell ; - xmem_debug( - fprintf(stderr, "xmem: freecell cached at pos %d\n", pos); - ); - } else { - for (pos=0 ; pos xmemory_table.max_cells) xmemory_table.max_cells = xmemory_table.ncells ; - xmemory_table.freecell = -1 ; return pos ; } @@ -515,8 +511,6 @@ static int xmemory_remcell(int pos) xmemory_table.pointer[pos] = NULL ; /* Decrement number of allocated pointers */ xmemory_table.ncells -- ; - /* Set this position as last known free position */ - xmemory_table.freecell = pos ; return 0 ; } @@ -972,6 +966,7 @@ void xmemory_free(void * ptr, char * filename, int lineno) int pos ; char * swapname ; int nptrs ; + int ii; /* Do nothing for a NULL pointer */ if (ptr==NULL) { @@ -988,7 +983,9 @@ void xmemory_free(void * ptr, char * filename, int lineno) /* Locate pointer in main table */ nptrs = 0 ; pos = -1 ; - for (i=0 ; i0) +#if (XMEMORY_DEBUG>=1) fprintf(stderr, "#----- memory diagnostics called from %s (%d) --------\n", filename, lineno); diff --git a/qfits/sysconf.c b/qfits/sysconf.c index 2caedcf..361f75b 100644 --- a/qfits/sysconf.c +++ b/qfits/sysconf.c @@ -3,16 +3,16 @@ @file sysconf.c @author Nicolas Devillard @date February 2001 - @version $Revision: 1.29 $ + @version $Revision: 1.30 $ @brief configure-like in C. */ /*----------------------------------------------------------------------------*/ /* - $Id: sysconf.c,v 1.29 2003/07/17 08:02:08 yjung Exp $ + $Id: sysconf.c,v 1.30 2003/10/23 12:47:34 yjung Exp $ $Author: yjung $ - $Date: 2003/07/17 08:02:08 $ - $Revision: 1.29 $ + $Date: 2003/10/23 12:47:34 $ + $Revision: 1.30 $ */ /*--------------------------------------------------------------------------- @@ -38,7 +38,7 @@ #define COMPILER_CC 1 #define COMPILER_GCC 2 -#define XMEMDEBUG " -DXMEMORY_DEBUG=2" +#define XMEMDEBUG " -DXMEMORY_DEBUG=1" /* Global variable */