Article View: comp.sys.next.programmer
Article #64Re: Keeping data from swapping
From: Andrew Loewenstern
Date: Thu, 29 Oct 1992 08:30
Date: Thu, 29 Oct 1992 08:30
35 lines
2228 bytes
2228 bytes
In article <1992Oct29.082747.825@cubetech.com> andrew@cubetech.com (Andrew Loewenstern) writes:
>In article <1992Oct28.075558.2721@relief.com> jjfeiler@relief.com writes:
>>I've got a large image that I need to keep all in ram, at all times. I've
>>used get/setrlimit(RLIMIT_DATA,rtp) calls to set the data limit to the
>>maximum, and that definitely seems to help, but is there any way to wire down
>>pages of ram from an application? If that isn't possible, would it be
>>possible to write a LKS that wired down the pages for the image, and made
>>that chunk of ram available to another app?
>
>Try creating an LKS, allocating the memory with vm_allocate, and
>passing a pointer to the memory through a mach-message to the
>revieving app. That _should_ do the trick. The memory will be mapped
>copy-on-write in the receiver's address space. It should be wired
>down, but don't write to it or a non-wired down copy will be
>created...
>
>
>andrew
>--
>andrew@cubetech.com | "We shall not cease from exploration
>Andrew Loewenstern | And the end of our exploring
>Cube Technologies, Inc. | Will be to arrive where we started
> | And know the place for the first time." -T.S. Eliot
Oh yeah, it probably wouldn't be a really great idea to allocate a
whole lot of wired-down pages. I don't think you can _ever_ reclaim
them and can really make the machine thrash if you take too much.
andrew
--
andrew@cubetech.com | "We shall not cease from exploration
Andrew Loewenstern | And the end of our exploring
Cube Technologies, Inc. | Will be to arrive where we started
| And know the place for the first time." -T.S. Eliot
Technical Details
Message-ID:
<1992Oct29.083045.1224@cubetech.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!ames!sun-barr!cs.utexas.edu!uwm.edu!rutgers!cmcl2!psinntp!psinntp!cubetech.com!imladris!andrewReferences:
<1992Oct28.075558.2721@relief.com> <1992Oct29.082747.825@cubetech.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!ames!sun-barr!cs.utexas.edu!uwm.edu!rutgers!cmcl2!psinntp!psinntp!cubetech.com!imladris!andrew From: andrew@cubetech.com (Andrew Loewenstern) Newsgroups: comp.sys.next.programmer Subject: Re: Keeping data from swapping Message-ID: <1992Oct29.083045.1224@cubetech.com> Date: 29 Oct 92 08:30:45 GMT References: <1992Oct28.075558.2721@relief.com> <1992Oct29.082747.825@cubetech.com> Organization: Cube Technologies, Inc. Lines: 35