:
:Dwayne wrote:
:> I'm creating an app where I want to use memory to store data so I
:> can get at it quickly. The problem is, I can't afford the delays that
:> would occur if the memory gets swapped out. Is there any way in FreeBSD
:> to allocate memory so that the VM system won't swap it out?
:>
:I think mlock(2) is what you want.
:
:Maxime Henrion
:--
:Don't be fooled by cheap finnish imitations ; BSD is the One True Code
Don't use mlock().
Use SysV Shared memory segments. If you tell the kernel to use
physical ram for SysV shared memory (kern.ipc.shm_use_phys=1)
then any shm segments you allocate (see manual pages for
shmctl, shmget, and shmat) will reside in unswappable shared memory.
-Matt
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message