Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Snapchat/Valdi
/ makeReadOnly
Method
makeReadOnly
valdi/src/valdi/runtime/Resources/MmapBuffer.cpp:125–131 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
123
}
124
125
Result<Void> MmapBuffer::makeReadOnly() {
126
if (mprotect(_addr, _size, PROT_READ) != 0) {
127
return Error(STRING_FORMAT(
"mprotect failed: {}"
, strerror(errno)));
128
}
129
130
return Void();
131
}
132
133
} // namespace Valdi
Callers
2
TEST
Function · 0.80
decompressToMmap
Method · 0.80
Calls
2
Error
Interface · 0.50
Void
Class · 0.50
Tested by
1
TEST
Function · 0.64