Speed up ll_assert_aligned
Although only used in Debug mode, this showed up in a profiling with a very significant amount of CPU cycles (in a state when the viewer bogged down to 1 FPS because of drawing terrain, but still - significant compared to the code that was being executed (ie, 10%)). This patch should bring that down from a few hunderd to one clock cycle.
This commit is contained in:
@@ -61,17 +61,13 @@ BOOL LLMemory::sEnableMemoryFailurePrevention = FALSE;
|
||||
LLPrivateMemoryPoolManager::mem_allocation_info_t LLPrivateMemoryPoolManager::sMemAllocationTracker;
|
||||
#endif
|
||||
|
||||
void ll_assert_aligned_func(uintptr_t ptr,U32 alignment)
|
||||
{
|
||||
#ifdef SHOW_ASSERT
|
||||
void singu_alignment_check_failed(void)
|
||||
{
|
||||
// Redundant, place to set breakpoints.
|
||||
if (ptr%alignment!=0)
|
||||
{
|
||||
llwarns << "alignment check failed" << llendl;
|
||||
}
|
||||
llassert(ptr%alignment==0);
|
||||
#endif
|
||||
llassert(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
//static
|
||||
void LLMemory::initClass()
|
||||
|
||||
Reference in New Issue
Block a user