Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: trunk/src/base/memory/discardable_memory_allocator_android.cc

Issue 257383004: Revert 267170 "Use DiscardableMemoryManager on Android." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698