diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-09 02:06:29 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-09 02:06:29 (GMT) |
commit | fe76fb1b580aa99fa26ccb26da88ce7e16b35a84 (patch) | |
tree | b90b9832ec612a2d7efead8c6bea6c767edc5b15 /src/H5Fprivate.h | |
parent | d5c705a642a1ed06fa8dcaa25b61aa75687799d2 (diff) | |
download | hdf5-fe76fb1b580aa99fa26ccb26da88ce7e16b35a84.zip hdf5-fe76fb1b580aa99fa26ccb26da88ce7e16b35a84.tar.gz hdf5-fe76fb1b580aa99fa26ccb26da88ce7e16b35a84.tar.bz2 |
[svn-r8844] Purpose:
Bug fix
Description:
The "shared" raw B-tree node can get freed before all the B-tree nodes
had been flushed out to disk and released by the cache.
Solution:
Implement a simple reference counting wrapper for objects in the library
and use it to hold the shared raw B-tree nodes so they aren't freed before all
references to them in memory are released.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir)
IRIX64 6.5 (modei4)
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r-- | src/H5Fprivate.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index aace023..452b160 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -211,7 +211,7 @@ typedef struct H5F_t H5F_t; /* Check for file driver feature enabled */ #define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags&(FL)) /* B-tree node raw page */ -#define H5F_RAW_PAGE(F) ((F)->shared->raw_page) +#define H5F_RC_PAGE(F) ((F)->shared->rc_page) #else /* H5F_PACKAGE */ #define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F)) #define H5F_SIZEOF_SIZE(F) (H5F_sizeof_size(F)) @@ -221,7 +221,7 @@ typedef struct H5F_t H5F_t; #define H5F_RDCC_NBYTES(F) (H5F_rdcc_nbytes(F)) #define H5F_RDCC_W0(F) (H5F_rdcc_w0(F)) #define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL)) -#define H5F_RAW_PAGE(F) (H5F_raw_page(F)) +#define H5F_RC_PAGE(F) (H5F_rc_page(F)) #endif /* H5F_PACKAGE */ @@ -387,6 +387,7 @@ typedef struct H5F_t H5F_t; /* Forward declarations for prototype arguments */ struct H5B_class_t; +struct H5RC_t; /* Private functions, not part of the publicly documented API */ H5_DLL herr_t H5F_init(void); @@ -417,7 +418,7 @@ H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature); H5_DLL size_t H5F_rdcc_nbytes(const H5F_t *f); H5_DLL size_t H5F_rdcc_nelmts(const H5F_t *f); H5_DLL double H5F_rdcc_w0(const H5F_t *f); -H5_DLL void *H5F_raw_page(const H5F_t *f); +H5_DLL struct H5RC_t *H5F_rc_page(const H5F_t *f); /* Functions that operate on blocks of bytes wrt super block */ H5_DLL herr_t H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, |