Article View: comp.sys.next.programmer
Article #66Re: Keeping data from swapping
From: Andrew Loewenstern
Date: Thu, 29 Oct 1992 08:27
Date: Thu, 29 Oct 1992 08:27
22 lines
1584 bytes
1584 bytes
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
Technical Details
Message-ID:
<1992Oct29.082747.825@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>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.082747.825@cubetech.com> Date: 29 Oct 92 08:27:47 GMT References: <1992Oct28.075558.2721@relief.com> Organization: Cube Technologies, Inc. Lines: 22