summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-05 03:46:16 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-05 03:46:16 +0800
commit849e8bdccab33fa65d599b8f0bddf8819f499553 (patch)
treea9376a18fae9b4774b68d28ec7b0a8061dc4128c /mbbsd/cache.c
parentd5c9ccc6c80d8aa8ed5ba8533ddfb9629c55b237 (diff)
downloadpttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.tar
pttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.tar.gz
pttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.tar.bz2
pttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.tar.lz
pttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.tar.xz
pttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.tar.zst
pttbbs-849e8bdccab33fa65d599b8f0bddf8819f499553.zip
remove mmap
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@411 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 9b14eb8a..206b39e3 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.39 2002/06/26 01:55:30 in2 Exp $ */
+/* $Id: cache.c,v 1.40 2002/07/04 19:46:16 in2 Exp $ */
#include "bbs.h"
#ifndef __FreeBSD__
@@ -56,19 +56,6 @@ void *attach_shm(int shmkey, int shmsize) {
void *shmptr;
int shmid;
- char *empty_addr;
- /* set up one page in-accessible -- jochang */
- {
- int fd = open("/dev/zero",O_RDONLY);
- int size = ((shmsize + 4095) / 4096) * 4096;
-
- munmap(
- (empty_addr=mmap(0,4096+size,PROT_NONE,MAP_PRIVATE,fd,0))+4096
- ,size);
-
- close(fd);
- }
-
shmid = shmget(shmkey, shmsize, 0);
if(shmid < 0) {
shmid = shmget(shmkey, shmsize, IPC_CREAT | 0600);
@@ -83,10 +70,6 @@ void *attach_shm(int shmkey, int shmsize) {
attach_err(shmkey, "shmat");
}
- /* unmap the page -- jochang */
- {
- munmap(empty_addr,4096);
- }
return shmptr;
}