Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Please use discardable_memory.h since this is just an internal file providing | |
| 6 // utility functions used both by discardable_memory_android.cc and | |
| 7 // discardable_memory_allocator_android.cc. | |
| 8 | |
| 9 #ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ANDROID_H_ | |
| 10 #define BASE_MEMORY_DISCARDABLE_MEMORY_ANDROID_H_ | |
| 11 | |
| 12 #include "base/basictypes.h" | |
| 13 #include "base/memory/discardable_memory.h" | |
| 14 | |
| 15 namespace base { | |
| 16 namespace internal { | |
| 17 | |
| 18 size_t AlignToNextPage(size_t size); | |
| 19 | |
| 20 bool CreateAshmemRegion(const char* name, size_t size, int* fd, void** address); | |
| 21 | |
| 22 bool CloseAshmemRegion(int fd, size_t size, void* address); | |
| 23 | |
| 24 LockDiscardableMemoryStatus LockAshmemRegion(int fd, | |
| 25 size_t off, | |
|
willchan no longer on Chromium
2013/11/28 22:51:55
Nit: s/off/offset/, just to be explicit.
Philippe
2013/11/29 12:41:05
Done.
| |
| 26 size_t size, | |
| 27 const void* address); | |
| 28 | |
| 29 bool UnlockAshmemRegion(int fd, size_t off, size_t size, const void* address); | |
|
willchan no longer on Chromium
2013/11/28 22:51:55
Nit: ditto here on offset
Philippe
2013/11/29 12:41:05
Done.
| |
| 30 | |
| 31 } // namespace internal | |
| 32 } // namespace base | |
| 33 | |
| 34 #endif // BASE_MEMORY_DISCARDABLE_MEMORY_ANDROID_H_ | |
| OLD | NEW |