summaryrefslogtreecommitdiff
path: root/real_malloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 14:48:42 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 14:48:42 +0400
commit7fd4efa1d0dbab63e6d9bddd1d72fa4aafc8ad52 (patch)
treef784c1f66c09df5e17aeb85cf5862b459d455ebd /real_malloc.c
downloadbdwgc-7fd4efa1d0dbab63e6d9bddd1d72fa4aafc8ad52.tar.gz
gc4.1 tarball importgc4_1
Diffstat (limited to 'real_malloc.c')
-rw-r--r--real_malloc.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/real_malloc.c b/real_malloc.c
new file mode 100644
index 00000000..dece9fdc
--- /dev/null
+++ b/real_malloc.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
+ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
+ *
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+ *
+ * Permission is hereby granted to use or copy this program
+ * for any purpose, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ */
+/* Boehm, May 19, 1994 2:04 pm PDT */
+
+
+# ifdef PCR
+/*
+ * This definition should go in its own file that includes no other
+ * header files. Otherwise, we risk not getting the underlying system
+ * malloc.
+ */
+# define PCR_NO_RENAME
+# include <stdlib.h>
+
+# ifdef __STDC__
+ char * real_malloc(size_t size)
+# else
+ char * real_malloc()
+ int size;
+# endif
+{
+ return((char *)malloc(size));
+}
+#endif /* PCR */
+