summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-11-17 16:53:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-11-17 16:53:48 (GMT)
commite87e574a5240c3ee84ced39baadda82cb6a0bca8 (patch)
tree91bc4d73680dcd07b414ae8442c4925b5dab4d3b /src/H5O.c
parentb24dec239811edbcd81de44384001e268115e69b (diff)
downloadhdf5-e87e574a5240c3ee84ced39baadda82cb6a0bca8.zip
hdf5-e87e574a5240c3ee84ced39baadda82cb6a0bca8.tar.gz
hdf5-e87e574a5240c3ee84ced39baadda82cb6a0bca8.tar.bz2
[svn-r9538] Purpose:
Code cleanup & optimizations Description: Clean up some of the code in attributes to avoid allocating memory and performing type conversions when the conversion is a noop. Avoid memory allocations of attribute data structures by switching to use library's free list memory allocator routines. Avoid memory allocations of object header continuation data structures by switching to use library's free list memory allocator routines. Rearrange threaded, balanced binary tree macros slightly to avoid some overhead. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Too minor to require h5committest
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5O.c b/src/H5O.c
index f2a1226..396fed5 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -156,6 +156,9 @@ H5FL_BLK_DEFINE_STATIC(chunk_image);
/* Declare external the free list for time_t's */
H5FL_EXTERN(time_t);
+/* Declare extern the free list for H5O_cont_t's */
+H5FL_EXTERN(H5O_cont_t);
+
/*-------------------------------------------------------------------------
* Function: H5O_init_interface
@@ -2920,7 +2923,7 @@ H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size)
*/
oh->mesg[found_null].type = H5O_CONT;
oh->mesg[found_null].dirty = TRUE;
- if (NULL==(cont = H5MM_calloc(sizeof(H5O_cont_t))))
+ if (NULL==(cont = H5FL_MALLOC(H5O_cont_t)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, UFAIL, "memory allocation failed");
cont->addr = HADDR_UNDEF;
cont->size = 0;