• Clemens Hammacher's avatar
    [platform] Allow to memory-map empty files · 6962334d
    Clemens Hammacher authored
    This current fails, since {mmap} fails with EINVAL for empty mappings.
    The destructor already has special handling for a {nullptr} mapping, so
    we can just use {nullptr} for empty files. We get a similar error on
    windows, and can fix it the same way.
    
    On order to make presubmit checks happy, we have to skip copyright
    checking and checking for terminating newlines for empty files.
    
    R=mlippautz@chromium.org
    
    Change-Id: I2b73da7ff6df72d8bdd40df1fff6422e0a46881e
    Reviewed-on: https://chromium-review.googlesource.com/c/1424861Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58970}
    6962334d
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...