Skip Menu |

This queue is for tickets about the Cache-FastMmap CPAN distribution.

Report information
The Basics
Id: 35483
Status: rejected
Priority: 0/
Queue: Cache-FastMmap

People
Owner: Nobody in particular
Requestors: TIMB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Would be good to allow anonymous mapping (without a cache file) re SOX
When the cache need only be shared among child processes there no need to keep the cache file around. It can be deleted after the Cache::FastMmap->new call. That still leaves a race condition though. It would be handy if there was a way to indicate that an anonymous memory mapping was wanted (i.e., that MAP_ANONYMOUS should be passed to mmap).
From: cpan [...] robm.fastmail.fm
On Mon Apr 28 10:05:13 2008, TIMB wrote: Show quoted text
> When the cache need only be shared among child processes there no need > to keep the cache > file around. It can be deleted after the Cache::FastMmap->new call. > That still leaves a race > condition though. > > It would be handy if there was a way to indicate that an anonymous > memory mapping was > wanted (i.e., that MAP_ANONYMOUS should be passed to mmap).
The problem is we need a file descriptor to do the fcntl page locking. In theory the file would need at least 1 byte per page to lock on as well, though currently since we use the same fd as the page file, we lock the entire page byte range. I don't really see this as particularly a problem, you can create a temp file with File::Temp on a tmpfs filesystem and unlink it afterwards to get the overall same effect.