From 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 11 Jul 2018 18:11:13 +0200 Subject: Roll back to ANGLE/2845 --- gfx/angle/src/compiler/translator/PoolAlloc.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'gfx/angle/src/compiler/translator/PoolAlloc.h') diff --git a/gfx/angle/src/compiler/translator/PoolAlloc.h b/gfx/angle/src/compiler/translator/PoolAlloc.h index f15b3e05d..026e7a5c1 100755 --- a/gfx/angle/src/compiler/translator/PoolAlloc.h +++ b/gfx/angle/src/compiler/translator/PoolAlloc.h @@ -157,12 +157,7 @@ public: void lock(); void unlock(); - private: - size_t alignment; // all returned allocations will be aligned at - // this granularity, which will be a power of 2 - size_t alignmentMask; - -#if !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) +protected: friend struct tHeader; struct tHeader { @@ -205,21 +200,20 @@ public: } size_t pageSize; // granularity of allocation from the OS + size_t alignment; // all returned allocations will be aligned at + // this granularity, which will be a power of 2 + size_t alignmentMask; size_t headerSkip; // amount of memory to skip to make room for the // header (basically, size of header, rounded // up to make it aligned size_t currentPageOffset; // next offset in top of inUseList to allocate from tHeader* freeList; // list of popped memory tHeader* inUseList; // list of all memory currently being used - tAllocStack mStack; // stack of where to allocate from, to partition pool + tAllocStack stack; // stack of where to allocate from, to partition pool int numCalls; // just an interesting statistic size_t totalBytes; // just an interesting statistic - -#else // !defined(ANGLE_TRANSLATOR_DISABLE_POOL_ALLOC) - std::vector> mStack; -#endif - +private: TPoolAllocator& operator=(const TPoolAllocator&); // dont allow assignment operator TPoolAllocator(const TPoolAllocator&); // dont allow default copy constructor bool mLocked; -- cgit v1.2.3