We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a23784 + 0836cbe commit a981ad3Copy full SHA for a981ad3
src/memory/map.cpp
@@ -558,7 +558,7 @@ bool map::remap_(size_t size) NOEXCEPT
558
bool map::resize_(size_t size) NOEXCEPT
559
{
560
// Disk full detection is platform common, any other failure is an abort.
561
- if (::ftruncate(opened_, size) == fail)
+ if (::fallocate(opened_, 0, capacity_, size - capacity_) == fail)
562
563
// Disk full is the only restartable store failure (leave mapped).
564
if (errno == ENOSPC)
0 commit comments