aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love2000-09-08 14:10:31 +0000
committerDave Love2000-09-08 14:10:31 +0000
commit423193c55298af7adee7999ecfb9c8ef54572afb (patch)
treed2ff385215c219b99a7995d2c3a493106f7871c8 /src
parent0460aa783ece2fe09bd7a8f7ec7338c95202b7d0 (diff)
downloademacs-423193c55298af7adee7999ecfb9c8ef54572afb.tar.gz
emacs-423193c55298af7adee7999ecfb9c8ef54572afb.zip
(r_alloc_init_fd): Conditionalize on MAP_ANON.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog17
-rw-r--r--src/ralloc.c2
2 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index fbea366446f..88902089325 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -13,6 +13,23 @@
13 13
142000-09-08 Dave Love <fx@gnu.org> 142000-09-08 Dave Love <fx@gnu.org>
15 15
16 * s/sol2.h (REL_ALLOC_MMAP): Define.
17 * s/irix5-0.h (REL_ALLOC_MMAP): Likewise.
18
19 * ralloc.c: Don't include string.h (redundant).
20 (MAP_ANON) [REL_ALLOC_MMAP]: Ensure it's defined.
21 [!MAP_ANON]: Include fcntl.h.
22 (mmap_fd) [REL_ALLOC_MMAP]: New variable.
23 (r_alloc, r_re_alloc, r_alloc_free)
24 (mmap_enlarge, mmap_set_vars): Use it.
25 (r_alloc_init_fd): New function.
26 (__morecore) [SYSTEM_MALLOC]: Don't declare.
27 (r_alloc_init): Call r_alloc_init_fd. Conditionalize stuff on
28 malloc type.
29
30 * Makefile.in (allocaobj) [!SYSTEM_MALLOC && REL_ALLOC_MMAP]:
31 Remove vm-limit.o.
32
16 * unexelf.c (SHT_MIPS_DEBUG, HDRR) [__mips__]: Really confine last 33 * unexelf.c (SHT_MIPS_DEBUG, HDRR) [__mips__]: Really confine last
17 change to __NetBSD__. 34 change to __NetBSD__.
18 35
diff --git a/src/ralloc.c b/src/ralloc.c
index f6ae887f4c1..65015d5f374 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1322,10 +1322,12 @@ void r_alloc_free P_ ((POINTER_TYPE **ptr));
1322void 1322void
1323r_alloc_init_fd () 1323r_alloc_init_fd ()
1324{ 1324{
1325#if !MAP_ANON
1325 /* No anonymous mmap -- we need the file descriptor. */ 1326 /* No anonymous mmap -- we need the file descriptor. */
1326 mmap_fd = open ("/dev/zero", O_RDONLY); 1327 mmap_fd = open ("/dev/zero", O_RDONLY);
1327 if (mmap_fd < 0) 1328 if (mmap_fd < 0)
1328 fatal ("cannot open /dev/zero"); 1329 fatal ("cannot open /dev/zero");
1330#endif
1329} 1331}
1330 1332
1331/* Return a region overlapping address range START...END, or null if 1333/* Return a region overlapping address range START...END, or null if