summaryrefslogtreecommitdiffstats
path: root/src/H5Oattr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-11-22 19:53:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-11-22 19:53:17 (GMT)
commit1cee912aaa058fa765be45c82881a458d32bc7b3 (patch)
treef7726c1276989d0f957fe88360464f2c39c56d38 /src/H5Oattr.c
parent293fe87eeec295c4bb4227e17557361ef2f22df2 (diff)
downloadhdf5-1cee912aaa058fa765be45c82881a458d32bc7b3.zip
hdf5-1cee912aaa058fa765be45c82881a458d32bc7b3.tar.gz
hdf5-1cee912aaa058fa765be45c82881a458d32bc7b3.tar.bz2
[svn-r9559] Purpose:
Code optimization Description: Switch a few more malloc/free pairs over to using internal free list code, to avoid abusing system memory allocator as badly. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Solaris 2.7 (arabica) Too minor to require h5committest
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r--src/H5Oattr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 28da005..476589c 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -71,6 +71,9 @@ const H5O_class_t H5O_ATTR[1] = {{
/* Declare extern the free list for H5A_t's */
H5FL_EXTERN(H5A_t);
+/* Declare extern the free list for attribute data buffers */
+H5FL_BLK_EXTERN(attr_buf);
+
/* Declare external the free list for H5S_t's */
H5FL_EXTERN(H5S_t);
@@ -203,7 +206,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *
/* Go get the data */
if(attr->data_size) {
- if (NULL==(attr->data = H5MM_malloc(attr->data_size)))
+ if (NULL==(attr->data = H5FL_BLK_MALLOC(attr_buf, attr->data_size)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
HDmemcpy(attr->data,p,attr->data_size);
}