summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-09 16:45:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-09 16:45:59 (GMT)
commita260c7849c1ca59bd32cde9d12380e89afd70770 (patch)
treea4d791e5df2d17b3fd6988ca84e363560b1c87cf /src/H5Gnode.c
parent0d050fcd579bf1db6db2d8a1d3fec617114bfd1f (diff)
downloadhdf5-a260c7849c1ca59bd32cde9d12380e89afd70770.zip
hdf5-a260c7849c1ca59bd32cde9d12380e89afd70770.tar.gz
hdf5-a260c7849c1ca59bd32cde9d12380e89afd70770.tar.bz2
[svn-r17] ./src/H5AC.c
Renamed H5AC_find() to H5AC_find_f() which is invoked from the H5AC_find() macro. Changed HASH() to H5AC_HASH(). ./src/H5ACprivate.h Increased the number of cache slots from 1033 to 10330 to see how it affects performance. This should probably be changeable on a per-file basis. ./src/H5B.c Fixed some bugs now that symbol tables are actually using the stuff. Improved debugging a little. Fixed uninitialized memory appearing in the file. ./src/H5D.c Changed a FUNC_ENTER() argument from H5Dset_info to H5Dwrite. ./src/H5F.c Plugged a memory leak in H5F_dest(). ./src/H5G.c ./src/H5Gprivate.h Many of these functions take a symbol table entry which describes the symbol table rather than just the symbol table address. Moved some functions to make room for the ones that understand directory names: H5G_new() -> H5G_stab_new() H5G_find() -> H5G_stab_find() H5G_modify() -> H5G_stab_modify() H5G_insert() -> H5G_stab_insert() H5G_list() -> H5G_stab_list() ./src/H5Gnode.c Added more assertions. Zero new memory so junk doesn't appear in the data file. This is a problem when one tries to declassify a classified data file. H5G_node_debug() can take an extra argument which is the address of the heap for the symbol table. If supplied, the symbol names are printed along with the heap offsets. ./src/H5H.c ./src/H5Hprivate.h Fixed a bug with the free blocks by forcing things to align on even boundaries. It's still possible to lose heap memory if the hole is smaller than the free list header. The alternative is to align heap objects on 12 or 20 byte boundaries, but this tends to waste to much space. Zero new memory like with H5Gnode.c. Fixed a "mispeling" of NDEBUG. ./src/H5Ocont.c ./src/H5Onull.c Added the pablo mask defn. ./src/H5Ostab.c Added the pablo mask defn. Fixed a read from uninitialized memory. ./src/H5Oprivate.h Tuned some parameters to see how they affect performance. ./src/debug.c An optional third argument can be supplied which is the address of a heap to use to display names in a symbol table. ./src/hdf5pabl.h Changed `int' to `intn'.
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 9e66188..11950f2 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -237,8 +237,6 @@ H5G_node_new (hdf5_file_t *f, void *_lt_key, void *_udata, void *_rt_key)
* Check arguments.
*/
assert (f);
- assert (lt_key);
- assert (rt_key);
sym = H5MM_xcalloc (1, sizeof(H5G_node_t));
size = H5G_node_size (f);
@@ -320,9 +318,9 @@ H5G_node_flush (hdf5_file_t *f, hbool_t destroy, haddr_t addr, H5G_node_t *sym)
/* entries */
H5G_encode_vec (f, &p, sym->entry, sym->nsyms);
-
+ memset (p, 0, size - (p-buf));
- status = H5F_block_write (f, addr, p-buf, buf);
+ status = H5F_block_write (f, addr, size, buf);
buf = H5MM_xfree (buf);
if (status<0) HRETURN_ERROR (H5E_SYM, H5E_WRITEERROR, FAIL);
}
@@ -855,12 +853,13 @@ H5G_node_list (hdf5_file_t *f, haddr_t addr, void *_udata)
*/
herr_t
H5G_node_debug (hdf5_file_t *f, haddr_t addr, FILE *stream, intn indent,
- intn fwidth)
+ intn fwidth, haddr_t heap)
{
int i, j;
char buf[64];
H5G_node_t *sn = NULL;
herr_t status;
+ const char *s;
FUNC_ENTER (H5G_node_debug, NULL, FAIL);
@@ -897,6 +896,11 @@ H5G_node_debug (hdf5_file_t *f, haddr_t addr, FILE *stream, intn indent,
fwidth = MAX (0, fwidth-3);
for (i=0; i<sn->nsyms; i++) {
fprintf (stream, "%*sSymbol %d:\n", indent-3, "", i);
+ if (heap>0 && (s = H5H_peek (f, heap, sn->entry[i].name_off))) {
+ fprintf (stream, "%*s%-*s `%s'\n", indent, "", fwidth,
+ "Name:",
+ s);
+ }
fprintf (stream, "%*s%-*s %lu\n", indent, "", fwidth,
"Name offset into private heap:",
(unsigned long)(sn->entry[i].name_off));