Merge mac-tiff-rm into rc176: marCCD TIFF frames read without memory-mapping (macOS page faults), output unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXc1zD1yxHqaR1DGdCTHL4
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-10-18 13:46:16 +02:00
commit dc5cca7a45
1 file changed
+3 -1
+3 -1
View File
@@ -306,7 +306,9 @@ Header ReadRaw(const std::string &path, uint16_t *out, size_t capacity) {
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds,
path + ": image is larger than the buffer given for it");
TIFF *tiff = TIFFOpen(path.c_str(), "r");
// "m": read, not memory-mapped. On macOS a mapped 32 MB frame is paged in under the copy out of it, as
// page faults (a fifth of the image passes' busy CPU samples on 4nwv); the same bits either way.
TIFF *tiff = TIFFOpen(path.c_str(), "rm");
if (tiff == nullptr)
throw JFJochException(JFJochExceptionCategory::TIFFGeneratorError, "Cannot open TIFF " + path);
struct Closer {