author | Camm Maguire <camm@debian.org> | 2005年01月13日 22:46:34 +0000 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2005年01月13日 22:46:34 +0000 |
commit | 16cb9a4756967addbd00aa959d818a5bf3dd8ad2 (patch) | |
tree | 2728c4840498cf0d2ff3804c75ba6f00928f4cc6 | |
parent | c1e962780b84bd34864f6f45f93862d8dac56b9a (diff) | |
download | gcl-unlabeled-1.12.6.1.10.tar.gz |
-rwxr-xr-x | gcl/h/386-linux.h | 15 |
diff --git a/gcl/h/386-linux.h b/gcl/h/386-linux.h index 4b62b5169..16ff5d26a 100755 --- a/gcl/h/386-linux.h +++ b/gcl/h/386-linux.h @@ -41,3 +41,18 @@ #define I386 #define SGC + + +#ifdef IN_SFASL +#include <sys/mman.h> +#define CLEAR_CACHE {\ + void *p,*pe; \ + p=(void *)((unsigned long)memory->cfd.cfd_start & ~(PAGESIZE-1)); \ + pe=(void *)((unsigned long)(memory->cfd.cfd_start+memory->cfd.cfd_size) & ~(PAGESIZE-1)) + PAGESIZE-1; \ + if (mprotect(p,pe-p,PROT_READ|PROT_WRITE|PROT_EXEC)) {\ + fprintf(stderr,"%p %p\n",p,pe);\ + perror("");\ + FEerror("Cannot mprotect", 0);\ + }\ +} +#endif |