summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/Include/PoolAlloc.h
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2005-03-18 14:28:02 +0000
committerMichal Krol <mjkrol@gmail.org>2005-03-18 14:28:02 +0000
commit2fb2e27e28569371bd0d12aa74504d53bb04edc0 (patch)
tree87fd04629f66c78767e68ed8fe9ea2d552771042 /src/mesa/shader/slang/Include/PoolAlloc.h
parent5b641a516ecde984027d4fc1fe198195b7b861a7 (diff)
update against 03-Feb-2005 release
Diffstat (limited to 'src/mesa/shader/slang/Include/PoolAlloc.h')
-rwxr-xr-xsrc/mesa/shader/slang/Include/PoolAlloc.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/mesa/shader/slang/Include/PoolAlloc.h b/src/mesa/shader/slang/Include/PoolAlloc.h
index 317ce0447d..3649981ef2 100755
--- a/src/mesa/shader/slang/Include/PoolAlloc.h
+++ b/src/mesa/shader/slang/Include/PoolAlloc.h
@@ -1,5 +1,5 @@
//
-//Copyright (C) 2002-2004 3Dlabs Inc. Ltd.
+//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without
@@ -84,8 +84,8 @@ public:
}
void check() const {
- checkGuardBlock(preGuard(), (unsigned char) (guardBlockBeginVal), "before");
- checkGuardBlock(postGuard(), (unsigned char) (guardBlockEndVal), "after");
+ checkGuardBlock(preGuard(), guardBlockBeginVal, "before");
+ checkGuardBlock(postGuard(), guardBlockEndVal, "after");
}
void checkAllocList() const;
@@ -113,21 +113,16 @@ private:
unsigned char* mem; // beginning of our allocation (pts to header)
TAllocation* prevAlloc; // prior allocation in the chain
- enum {
- guardBlockBeginVal = 0xfb,
- guardBlockEndVal = 0xfe,
- userDataFill = 0xcd
- };
+ // Support MSVC++ 6.0
+ const static unsigned char guardBlockBeginVal;
+ const static unsigned char guardBlockEndVal;
+ const static unsigned char userDataFill;
# ifdef GUARD_BLOCKS
- enum {
- guardBlockSize = 16
- };
+ const static size_t guardBlockSize;
inline static size_t headerSize() { return sizeof(TAllocation); }
# else
- enum {
- guardBlockSize = 0
- };
+ const static size_t guardBlockSize;
inline static size_t headerSize() { return 0; }
# endif
};
@@ -254,13 +249,10 @@ private:
//
typedef TPoolAllocator* PoolAllocatorPointer;
extern TPoolAllocator& GetGlobalPoolAllocator();
-extern PoolAllocatorPointer& GetCompilerPoolAllocator();
#define GlobalPoolAllocator GetGlobalPoolAllocator()
-#define CompilerPoolAllocator GetCompilerPoolAllocator()
struct TThreadGlobalPools
{
TPoolAllocator* globalPoolAllocator;
- TPoolAllocator* compilerPoolAllocator;
};
//