diff options
author | Elliott Hughes <enh@google.com> | 2017-09-15 16:09:22 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-09-15 16:18:49 -0700 |
commit | 7b0af7ad82fcf88e800d1a553d81fda29dc064bd (patch) | |
tree | 4cf982c55c48b49864bcb4f986c7400d640930e0 /linker/linker_block_allocator.cpp | |
parent | 3b64f8ecb3db49574cc5b7c6030be98c159be4d4 (diff) |
Always log errno when aborting.
(Where errno is relevant.)
Also consistently use -1 as the fd for anonymous mmaps. (It doesn't matter,
but it's more common, and potentially more intention-revealing.)
Bug: http://b/65608572
Test: ran tests
Change-Id: Ie9a207632d8242f42086ba3ca862519014c3c102
Diffstat (limited to 'linker/linker_block_allocator.cpp')
-rw-r--r-- | linker/linker_block_allocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linker/linker_block_allocator.cpp b/linker/linker_block_allocator.cpp index 605e18562..abb1ebd08 100644 --- a/linker/linker_block_allocator.cpp +++ b/linker/linker_block_allocator.cpp @@ -117,7 +117,7 @@ void LinkerBlockAllocator::create_new_page() { "Invalid sizeof(LinkerBlockAllocatorPage)"); LinkerBlockAllocatorPage* page = reinterpret_cast<LinkerBlockAllocatorPage*>( - mmap(nullptr, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0)); + mmap(nullptr, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)); if (page == MAP_FAILED) { abort(); // oom |