Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR/AA) Newsgroups: comp.lang.perl Subject: Re: anyone gotten mmap to work w/ perl? Message-ID: <1991Apr17.235656.10193@NCoast.ORG> Date: 17 Apr 91 23:56:56 GMT References: <1991Apr9.051702.22978@jpl-devvax.jpl.nasa.gov> <28046072.4CFC@tct.com> <129281@uunet.UU.NET> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR/AA) Followup-To: comp.lang.perl Organization: North Coast Public Access Un*x (ncoast) Lines: 32 As quoted from <129281@uunet.UU.NET> by rbj@uunet.UU.NET (Root Boy Jim): +--------------- | In article <28046072.4CFC@tct.com> chip@tct.com (Chip Salzenberg) writes: | >According to lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall): | >>What you'd really kinda like is a way to mmap a particular variable, and | >>let Perl worry about it when it gets reallocated... | > | >If such a thing were done, we we would get shmat() for System V IPC | >almost for free. | | As it should be. I have already complained that shm{read,write} | detach the shared memory segment between accesses. The implementor | wrote back and said he did it that way just to get it to work, but | didn't really understand how to do what Larry suggested. +--------------- Were I designing it, I'd arrange for strings (well, symbol table entries) to contain the "allocate" and "extend" function pointers for the strings. That way, you can do a whole bunch of things: extending strings enlarges the mmap() or shmat() area, or calls a function which arranges for a usersub to know what's going on (e.g. changes the projection list information for the Oracle usersubs recently posted), etc. (I'd mention "fixed-size" strings, but I can only think of one valid use for them: mmap()/shmat(). If there were a way to map device driver registers into user-mode code, this would also be a good application.) ++Brandon -- Me: Brandon S. Allbery Ham: KB8JRR/AA on 2m, 220, 440, 1200 Internet: allbery@NCoast.ORG (QRT on HF until local problems fixed) America OnLine: KB8JRR // Delphi: ALLBERY AMPR: kb8jrr.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery KB8JRR @ WA8BXN.OH