OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/memory/discardable_memory_allocator_android.h" | 5 #include "base/memory/discardable_memory_allocator_android.h" |
6 | 6 |
7 #include <sys/mman.h> | 7 #include <sys/mman.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 DCHECK_LE(ashmem_regions_.size(), 5U); | 544 DCHECK_LE(ashmem_regions_.size(), 5U); |
545 const ScopedVector<AshmemRegion>::iterator it = std::find( | 545 const ScopedVector<AshmemRegion>::iterator it = std::find( |
546 ashmem_regions_.begin(), ashmem_regions_.end(), region); | 546 ashmem_regions_.begin(), ashmem_regions_.end(), region); |
547 DCHECK_NE(ashmem_regions_.end(), it); | 547 DCHECK_NE(ashmem_regions_.end(), it); |
548 std::swap(*it, ashmem_regions_.back()); | 548 std::swap(*it, ashmem_regions_.back()); |
549 ashmem_regions_.pop_back(); | 549 ashmem_regions_.pop_back(); |
550 } | 550 } |
551 | 551 |
552 } // namespace internal | 552 } // namespace internal |
553 } // namespace base | 553 } // namespace base |
OLD | NEW |