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 @@ - +
Data Structures | |
struct | qfits_col |
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 @@ - +
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 @@ - +
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 @@ - +
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 @@ - +
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