Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-07-16 00:16:32 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-07-16 00:16:32 +0400
commitedba3282e8c83ef5e9e821fb158183886913be13 (patch)
tree19ab6ac7d819dc75966dfbfa5150fe57d742ef40 /newlib/libc/sys/linux/include/mcheck.h
parent315fb3afb0197ff082ac5f7ec7a4b0ed71802f55 (diff)
2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/Makefile.am: Add new files. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/bp-sym.h: Moved to include directory. * libc/sys/linux/mmap.c: Add weak aliases: __mmap, __munmap, __mremap. * libc/sys/linux/inode.c: Set _LIBC to 1. * libc/sys/linux/mq_close.c: Ditto. * libc/sys/linux/mq_getattr.c: Ditto. * libc/sys/linux/mq_open.c: Ditto. * libc/sys/linux/mq_receive.c: Ditto. * libc/sys/linux/mq_send.c: Ditto. * libc/sys/linux/mq_setattr.c: Ditto. * libc/sys/linux/mq_unlink.c: Ditto. * libc/sys/linux/calloc.c: New file. * libc/sys/linux/callocr.c: Ditto. * libc/sys/linux/cfreer.c: Ditto. * libc/sys/linux/config.h: Ditto. * libc/sys/linux/free.c: Ditto. * libc/sys/linux/freer.c: Ditto. * libc/sys/linux/msize.c: Ditto. * libc/sys/linux/msizer.c: Ditto. * libc/sys/linux/mstats.c: Ditto. * libc/sys/linux/mtrim.c: Ditto. * libc/sys/linux/mtrimr.c: Ditto. * libc/sys/linux/pvallocr.c: Ditto. * libc/sys/linux/realloc.c: Ditto. * libc/sys/linux/reallocr.c: Ditto. * libc/sys/linux/thread-m.h: Ditto. * libc/sys/linux/vallocr.c: Ditto. * libc/sys/linux/bp-checks.h: Ditto. * libc/sys/linux/libc-symbols.h: Ditto. * libc/sys/linux/libc-tsd.h: Ditto. * libc/sys/linux/libintl.h: Ditto. * libc/sys/linux/malign.c: Ditto. * libc/sys/linux/malignr.c: Ditto. * libc/sys/linux/mallinfor.c: Ditto. * libc/sys/linux/malloc.c: Ditto. * libc/sys/linux/mallocr.c: Ditto. * libc/sys/linux/malloptr.c: Ditto. * libc/sys/linux/mallstatsr.c: Ditto. * libc/sys/linux/mcheck.c: Ditto. * libc/sys/linux/mhooks.h: Ditto. * libc/sys/linux/include/bp-sym.h: Ditto. * libc/sys/linux/include/malloc.h: Ditto. * libc/sys/linux/include/mcheck.h: Ditto. * libc/sys/linux/machine/i386/getpagesize.c: New file. * libc/sys/linux/machine/i386/Makefile.am: Add getpagesize.c. * libc/sys/linux/machine/i386/Makefile.in: Regenerated. * libc/sys/linux/machine/i386/sysdep.h: New file. * libc/sys/linux/machine/i386/weakalias.h: Add weak_function support. * libc/sys/linux/sys/dirent.h: Set _LIBC to 1. * libc/sys/linux/sys/types.h: Add new types.
Diffstat (limited to 'newlib/libc/sys/linux/include/mcheck.h')
-rw-r--r--newlib/libc/sys/linux/include/mcheck.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/newlib/libc/sys/linux/include/mcheck.h b/newlib/libc/sys/linux/include/mcheck.h
new file mode 100644
index 000000000..39e396d38
--- /dev/null
+++ b/newlib/libc/sys/linux/include/mcheck.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Modified for newlib, July 9, 2002 by Jeff Johnston */
+
+#ifndef _MCHECK_H
+#define _MCHECK_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return values for `mprobe': these are the kinds of inconsistencies that
+ `mcheck' enables detection of. */
+enum mcheck_status
+ {
+ MCHECK_DISABLED = -1, /* Consistency checking is not turned on. */
+ MCHECK_OK, /* Block is fine. */
+ MCHECK_FREE, /* Block freed twice. */
+ MCHECK_HEAD, /* Memory before the block was clobbered. */
+ MCHECK_TAIL /* Memory after the block was clobbered. */
+ };
+
+
+/* Activate a standard collection of debugging hooks. This must be called
+ before `malloc' is ever called. ABORTFUNC is called with an error code
+ (see enum above) when an inconsistency is detected. If ABORTFUNC is
+ null, the standard function prints on stderr and then calls `abort'. */
+extern int mcheck (void (*__abortfunc) (enum mcheck_status));
+
+/* Similar to `mcheck´ but performs checks for all block whenever one of
+ the memory handling functions is called. This can be very slow. */
+extern int mcheck_pedantic (void (*__abortfunc) (enum mcheck_status));
+
+/* Force check of all blocks now. */
+extern void mcheck_check_all (void);
+
+/* Check for aberrations in a particular malloc'd block. You must have
+ called `mcheck' already. These are the same checks that `mcheck' does
+ when you free or reallocate a block. */
+extern enum mcheck_status mprobe (void *__ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* mcheck.h */