mmap
mmap(2) bindings for node.js that work in 0.10Installing
npm test
npm install -g
Usage
mmap = require("mmap")
buffer = mmap(n_bytes, protection, flags, fd, offset)
While a finaliser is installed to automatically unmap buffer, you can force it to unmap immediately with:
buffer.unmap()
You can also msync() by calling: buffer.sync([offset, [length, [flags]]])
method:For compatibility, mmap.map() is an alias for mmap()
See Also
- POSIX 1003.1 mmap and msync
- The
example/
directory contains some sample uses of the mmap module - bnoordhuis/node-mmap, the original node-mmap, on which this is based.