summaryrefslogtreecommitdiffstats
path: root/src/H5WBprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-06-29 03:12:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-06-29 03:12:45 (GMT)
commitcad9846d77ea4926bb0f13cf5151c1a7ac05ec87 (patch)
treec88b30412b25b6fc5df9534a6ff2cf1742393a36 /src/H5WBprivate.h
parent58467956ba56fc52dd03e3540f14b062f9a6c5bb (diff)
downloadhdf5-cad9846d77ea4926bb0f13cf5151c1a7ac05ec87.zip
hdf5-cad9846d77ea4926bb0f13cf5151c1a7ac05ec87.tar.gz
hdf5-cad9846d77ea4926bb0f13cf5151c1a7ac05ec87.tar.bz2
[svn-r13926] Description:
Add small interface to "wrap" a static buffer (usually on the stack), but still allow for buffers larger than the static buffer to be allocated. This can eliminate _many_ short-lived buffer allocations in situations where the buffer is a predictable size (or at least a "very likely" size). Also, some minor code cleanups, particularly in the SOHM caching code. Tested on: Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'src/H5WBprivate.h')
-rw-r--r--src/H5WBprivate.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/H5WBprivate.h b/src/H5WBprivate.h
new file mode 100644
index 0000000..cfa3fcb
--- /dev/null
+++ b/src/H5WBprivate.h
@@ -0,0 +1,64 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5WBprivate.h
+ * Jun 26 2007
+ * Quincey Koziol <koziol@hdfgroup.org>
+ *
+ * Purpose: Private header for library accessible wrapped buffer routines.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#ifndef _H5WBprivate_H
+#define _H5WBprivate_H
+
+/* Include package's public header */
+/* #include "H5WBpublic.h" */
+
+/* Private headers needed by this file */
+
+/**************************/
+/* Library Private Macros */
+/**************************/
+
+
+/****************************/
+/* Library Private Typedefs */
+/****************************/
+
+/* Wrapped buffer info (forward decl - defined in H5WB.c) */
+typedef struct H5WB_t H5WB_t;
+
+
+/*****************************/
+/* Library-private Variables */
+/*****************************/
+
+
+/***************************************/
+/* Library-private Function Prototypes */
+/***************************************/
+
+/* General routines for wrapped buffer operations */
+H5_DLL H5WB_t *H5WB_wrap(void *buf, size_t buf_size);
+H5_DLL void *H5WB_actual(H5WB_t *wb, size_t need);
+H5_DLL void *H5WB_actual_clear(H5WB_t *wb, size_t need);
+H5_DLL herr_t H5WB_unwrap(H5WB_t *wb);
+
+#endif /* _H5WBprivate_H */
+