summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmemory.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-11-22 08:35:41 -0500
committerNat Goodspeed <nat@lindenlab.com>2016-11-22 08:35:41 -0500
commit40f7501319087291c8b9881095b4b35f0dcf0554 (patch)
tree7562dee3827775a10e5e4a46e697af0dc50b0183 /indra/llcommon/llmemory.h
parent2c8ad717fd9b360efd5a3b04a09a9f096313da6f (diff)
DRTVWR-418: Use uintptr_t when casting pointers to ints.
LLPrivateMemoryPool and LLPrivateMemoryPoolManager have assumed that it's always valid to cast a pointer to U32. With 64-bit pointers, no longer true.
Diffstat (limited to 'indra/llcommon/llmemory.h')
-rw-r--r--indra/llcommon/llmemory.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 98e08cdc55..5a3c9bd762 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -415,7 +415,7 @@ public:
{
bool operator()(const LLMemoryBlock* const& lhs, const LLMemoryBlock* const& rhs)
{
- return (U32)lhs->getBuffer() < (U32)rhs->getBuffer();
+ return (uintptr_t)lhs->getBuffer() < (uintptr_t)rhs->getBuffer();
}
};
};
@@ -446,7 +446,7 @@ public:
void dump() ;
private:
- U32 getPageIndex(U32 addr) ;
+ U32 getPageIndex(uintptr_t addr) ;
U32 getBlockLevel(U32 size) ;
U16 getPageLevel(U32 size) ;
LLMemoryBlock* addBlock(U32 blk_idx) ;