Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdlib Only define MADV_FREE do MADV_DONTNEED if it...
details: https://anonhg.NetBSD.org/src/rev/416c84a53ec4
branches: trunk
changeset: 474346:416c84a53ec4
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Jul 04 03:12:47 1999 +0000
description:
Only define MADV_FREE do MADV_DONTNEED if it's not already defined
by <sys/mman.h>.
diffstat:
lib/libc/stdlib/malloc.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r ea91c9a22116 -r 416c84a53ec4 lib/libc/stdlib/malloc.c
--- a/lib/libc/stdlib/malloc.c Sun Jul 04 02:57:51 1999 +0000
+++ b/lib/libc/stdlib/malloc.c Sun Jul 04 03:12:47 1999 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: malloc.c,v 1.18 1999/07/04 03:12:47 thorpej Exp $ */
+
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
@@ -69,7 +71,6 @@
# include <sys/param.h>
# define malloc_pageshift PGSHIFT
# define malloc_minsize 16U
-# define MADV_FREE MADV_DONTNEED
#endif /* __NetBSD__ */
#if defined(__sparc__) && defined(sun)
@@ -81,7 +82,6 @@
# define INIT_MMAP() \
{ if ((fdzero=open("/dev/zero", O_RDWR, 0000)) == -1) \
wrterror("open of /dev/zero"); }
-# define MADV_FREE MADV_DONTNEED
#endif /* __sparc__ */
/* Insert your combination here... */
@@ -187,6 +187,10 @@
#define INIT_MMAP()
#endif
+#ifndef MADV_FREE
+#define MADV_FREE MADV_DONTNEED
+#endif
+
/* Set when initialization has been done */
static unsigned malloc_started;
Home |
Main Index |
Thread Index |
Old Index