Class | Mmap |
In: |
mmap.rb
|
Parent: | Object |
Pathname of the file, if nil is given an anonymous map is created Mmanp::MAP_ANON
Mode to open the file, it can be "r", "w", "rw", "a"
specify the nature of the mapping
Creates a mapping that‘s shared with all other processes mapping the same areas of the file. The default value is Mmap::MAP_SHARED
Creates a private copy-on-write mapping, so changes to the contents of the mmap object will be private to this process
Hash. If one of the options length or offset is specified it will not possible to modify the size of the mapped file.
length: | maps length bytes from the file |
offset: | the mapping begin at offset |
advice: | the type of the access (see madvise) |
global substitution
str.gsub!(pattern, replacement) => str or nil
str.gsub!(pattern) {|match| block } => str or nil
advice can have the value Mmap::MADV_NORMAL, Mmap::MADV_RANDOM, Mmap::MADV_SEQUENTIAL, Mmap::MADV_WILLNEED, Mmap::MADV_DONTNEED
substitution
str.sub!(pattern, replacement) => str or nil
str.sub!(pattern) {|match| block } => str or nil