Add a call to posix_fadvise() to indicate to the kernel, that `named`
won't be needing the dumped zone files any time soon with:
* POSIX_FADV_DONTNEED - The specified data will not be accessed in the
near future.
Notes:
POSIX_FADV_DONTNEED attempts to free cached pages associated with the
specified region. This is useful, for example, while streaming large
files. A program may periodically request the kernel to free cached
data that has already been used, so that more useful cached pages are
not discarded instead.
isc_result_totext(result));
goto cleanup;
}
+
+#if defined(POSIX_FADV_DONTNEED)
+ posix_fadvise(fileno(f), 0, 0, POSIX_FADV_DONTNEED);
+#endif
+
*tempp = tempname;
*fp = f;
return (ISC_R_SUCCESS);