2.0.2 • Published 10 years ago

mmap v2.0.2

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

mmap

mmap(2) bindings for node.js that work in 0.10

## Installing

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.