Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!exodus!appserv!slovax.Eng.Sun.COM!lm From: lm@slovax.Eng.Sun.COM (Larry McVoy) Newsgroups: comp.lang.perl Subject: anyone gotten mmap to work w/ perl? Message-ID: <535@appserv.Eng.Sun.COM> Date: 6 Apr 91 03:31:09 GMT Sender: news@appserv.Eng.Sun.COM Reply-To: lm@sun.UUCP (Larry McVoy) Organization: Sun Microsystems, Mountain View Lines: 20 The subject line says it all, I want to use mmap(2) from perl. I know I can do: sub mmap() { local($fh, $len, $prot) = @_; return (syscall(SYS_mmap(0, len, $prot, MAP_SHARED, fileno($fh), 0)); } The problem is the return address. I need to fake out perl into believing that the address is a string that is $len bytes long but should not be freed. Is there an easy way of doing this short of wacking on perl itself? Feel free to post answers, I read comp.lang.perl... Thanks in advance, --- Larry McVoy, Sun Microsystems (415) 336-7627 ...!sun!lm or lm@sun.com