diff options
author | Dave Love <fx@gnu.org> | 2000-09-08 16:31:11 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2000-09-08 16:31:11 +0000 |
commit | d93c318653b590403d1541a3e38bc460dbedf754 (patch) | |
tree | c7750672bd1bc0c8b475976e269217c07ef212ed /src/ralloc.c | |
parent | 1932bc86eb4e67438c3753d2d371fef00f6be2f2 (diff) | |
download | emacs-d93c318653b590403d1541a3e38bc460dbedf754.tar.gz |
(r_alloc_init_fd): Move. Fix conditional for pcc.
Diffstat (limited to 'src/ralloc.c')
-rw-r--r-- | src/ralloc.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index 6ef6a1f0cd1..23ff1dcb930 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -1317,18 +1317,7 @@ static struct mmap_region *mmap_find P_ ((POINTER_TYPE *, POINTER_TYPE *)); POINTER_TYPE *r_alloc P_ ((POINTER_TYPE **, size_t)); POINTER_TYPE *r_re_alloc P_ ((POINTER_TYPE **, size_t)); void r_alloc_free P_ ((POINTER_TYPE **ptr)); - - -void -r_alloc_init_fd () -{ -#if !MAP_ANON - /* No anonymous mmap -- we need the file descriptor. */ - mmap_fd = open ("/dev/zero", O_RDONLY); - if (mmap_fd < 0) - fatal ("cannot open /dev/zero"); -#endif -} +void r_alloc_init_fd (); /* Return a region overlapping address range START...END, or null if none. END is not including, i.e. the last byte in the range @@ -1667,6 +1656,21 @@ r_alloc_free (var) extern POINTER (*__morecore) (); #endif +/* Set up the file descriptor for non-anonymous mmapping. */ + +void +r_alloc_init_fd () +{ +#ifdef REL_ALLOC_MMAP +#if !MAP_ANON + /* No anonymous mmap -- we need the file descriptor. */ + mmap_fd = open ("/dev/zero", O_RDONLY); + if (mmap_fd < 0) + fatal ("cannot open /dev/zero"); +#endif +#endif +} + /* Initialize various things for memory allocation. */ static void |