This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Prototypes for some malloc functions
- From: Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: 29 Mar 2002 15:11:00 -0000
- Subject: Prototypes for some malloc functions
Here is a small patch to avoid some more warnings.
2002-03-29 Wolfram Gloger <wg@malloc.de>
* malloc/malloc.c: Add short description and prototypes for
malloc_get_state, malloc_set_state and posix_memalign, for
consistency and to avoid warnings with -Wstrict-prototypes.
Reported by Andreas Jaeger <aj@suse.de>.
--- malloc/malloc.c~ Fri Mar 29 15:53:07 2002
+++ malloc/malloc.c Fri Mar 29 15:27:23 2002
@@ -1190,6 +1190,39 @@
void public_mSTATs();
#endif
+/*
+ malloc_get_state(void);
+
+ Returns the state of all malloc variables in an opaque data
+ structure.
+*/
+#if __STD_C
+Void_t* public_gET_STATe(void);
+#else
+Void_t* public_gET_STATe();
+#endif
+
+/*
+ malloc_set_state(Void_t* state);
+
+ Restore the state of all malloc variables from data obtained with
+ malloc_get_state().
+*/
+#if __STD_C
+int public_sET_STATe(Void_t*);
+#else
+int public_sET_STATe();
+#endif
+
+#ifdef _LIBC
+/*
+ posix_memalign(void **memptr, size_t alignment, size_t size);
+
+ POSIX wrapper like memalign(), checking for validity of size.
+*/
+int __posix_memalign(void **, size_t, size_t);
+#endif
+
/* mallopt tuning options */
/*