chrsmithdemos / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Allow clients to set maximum number of memory mapped files #232

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently LevelDB sets a maximum of 1000 mmap()ed files on 64-bit systems and 
none on 32-bit systems via the MmapLimiter class. It would be beneficial for 
clients to be able to control this limit. For example, a client concerned about 
reliability might set this limit to zero on all systems to avoid SIGBUS when 
reading mmaped() files that have unrecoverable read errors. 

Admittedly the notion of memory mapped files is hidden in the POSIX environment 
utility class, but I think they are a common enough feature that it wouldn't be 
to bad of an abstraction leakage to expose a setter for this limit.

Original issue reported on code.google.com by mattjric...@gmail.com on 16 Apr 2014 at 6:12