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

Unified Diff: Source/wtf/OSAllocator.h

Issue 14156006: Simplify OSAllocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/wtf/PageAllocationAligned.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/OSAllocator.h
diff --git a/Source/wtf/OSAllocator.h b/Source/wtf/OSAllocator.h
index 89a1328e57a0a95c3b9c8d7532fa7bfa43271c54..f3f796d3041fea3729fa77277675bad919acfc14 100644
--- a/Source/wtf/OSAllocator.h
+++ b/Source/wtf/OSAllocator.h
@@ -60,12 +60,6 @@ public:
WTF_EXPORT_PRIVATE static void* reserveAndCommit(size_t, Usage = UnknownUsage, bool writable = true, bool executable = false, bool includesGuardPages = false);
static void decommitAndRelease(void* base, size_t size);
- // These methods are akin to reserveAndCommit/decommitAndRelease, above - however rather than
- // committing/decommitting the entire region additional parameters allow a subregion to be
- // specified.
- static void* reserveAndCommit(size_t reserveSize, size_t commitSize, Usage = UnknownUsage, bool writable = true, bool executable = false);
- static void decommitAndRelease(void* releaseBase, size_t releaseSize, void* decommitBase, size_t decommitSize);
-
// Reallocate an existing, committed allocation.
// The prior allocation must be fully comitted, and the new size will also be fully committed.
// This interface is provided since it may be possible to optimize this operation on some platforms.
@@ -73,25 +67,9 @@ public:
static T* reallocateCommitted(T*, size_t oldSize, size_t newSize, Usage = UnknownUsage, bool writable = true, bool executable = false);
};
-inline void* OSAllocator::reserveAndCommit(size_t reserveSize, size_t commitSize, Usage usage, bool writable, bool executable)
-{
- void* base = reserveUncommitted(reserveSize, usage, writable, executable);
- commit(base, commitSize, writable, executable);
- return base;
-}
-
-inline void OSAllocator::decommitAndRelease(void* releaseBase, size_t releaseSize, void* decommitBase, size_t decommitSize)
-{
- ASSERT(decommitBase >= releaseBase && (static_cast<char*>(decommitBase) + decommitSize) <= (static_cast<char*>(releaseBase) + releaseSize));
- UNUSED_PARAM(decommitBase);
- UNUSED_PARAM(decommitSize);
-
- releaseDecommitted(releaseBase, releaseSize);
-}
-
inline void OSAllocator::decommitAndRelease(void* base, size_t size)
{
- decommitAndRelease(base, size, base, size);
+ releaseDecommitted(base, size);
}
template<typename T>
« no previous file with comments | « no previous file | Source/wtf/PageAllocationAligned.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698