1.0.0 • Published 11 months ago

fadvise v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Native Node.js bindings for the posix_fadvise() function on Linux

Usage:

const fadvise = require('fadvise');
const fs = require('fs');

let fd = fs.openSync('./test.tmp', 'a');
fs.writeSync(fd, 'hundreds of megabytes');
fs.fsync(fd, function () {
  fadvise.posix_fadvise(fd, 0, 0, fadvise.POSIX_FADV_DONTNEED);
  fs.closeSync(fd);
});

In the example above, top and nocache's cachestats test.tmp should indicate 0 (additional) pages in buffers/cache.

See posix_fadvise(7) for details.

1.0.0

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago