diff options
| author | 2014-12-19 12:04:06 -0800 | |
|---|---|---|
| committer | 2014-12-22 11:32:36 -0800 | |
| commit | bed520b360f2aa81d00d30417cc96cc4f174c7ec (patch) | |
| tree | 466c4cccb560840b6dffd122d46da976b55b4d9c | |
| parent | 5c79aec9d53d1320041d5a52e5115d78d16035b7 (diff) | |
ART: Do not compile swap file functionality on Mac
Bug: 18596910
(cherry picked from commit 8a9f0049821803051201edebc6d9a0f0639756c3)
Change-Id: Ic06429f41840ce318cfaa837efecc69c2076440e
| -rw-r--r-- | compiler/utils/swap_space.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/utils/swap_space.cc b/compiler/utils/swap_space.cc index 19338c06a2..fc514354eb 100644 --- a/compiler/utils/swap_space.cc +++ b/compiler/utils/swap_space.cc @@ -131,6 +131,7 @@ void* SwapSpace::Alloc(size_t size) { } SpaceChunk SwapSpace::NewFileChunk(size_t min_size) { +#if !defined(__APPLE__) size_t next_part = std::max(RoundUp(min_size, kPageSize), RoundUp(kMininumMapSize, kPageSize)); int result = TEMP_FAILURE_RETRY(ftruncate64(fd_, size_ + next_part)); if (result != 0) { @@ -151,6 +152,11 @@ SpaceChunk SwapSpace::NewFileChunk(size_t min_size) { SpaceChunk new_chunk = {ptr, next_part}; maps_.push_back(new_chunk); return new_chunk; +#else + UNUSED(kMininumMapSize); + LOG(FATAL) << "No swap file support on the Mac."; + return {nullptr, 0U}; // NOLINT [readability/braces] [4] +#endif } // TODO: Full coalescing. |