summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-11-17 16:53:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-11-17 16:53:38 (GMT)
commit1878ad9c2cc038e1739887b12a26512daf76eefc (patch)
tree948052b3e450ede9f30c2c4db7ba6e6f0657bc53 /src/H5O.c
parent94b852d15a0e2a52251071929e451ea7af414108 (diff)
downloadhdf5-1878ad9c2cc038e1739887b12a26512daf76eefc.zip
hdf5-1878ad9c2cc038e1739887b12a26512daf76eefc.tar.gz
hdf5-1878ad9c2cc038e1739887b12a26512daf76eefc.tar.bz2
[svn-r9537] 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 587c8f8..7cf7893 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -154,6 +154,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
@@ -2918,7 +2921,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;