Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
738c28dae8
1 changed files with 8 additions and 8 deletions
|
@ -24,11 +24,11 @@
|
||||||
#include "nel/misc/variable.h"
|
#include "nel/misc/variable.h"
|
||||||
#include "stl_allocator_checker.h"
|
#include "stl_allocator_checker.h"
|
||||||
|
|
||||||
bool EnableStlAllocatorChecker= true;
|
bool EnableStlAllocatorChecker = true;
|
||||||
NLMISC_VARIABLE(bool,EnableStlAllocatorChecker,"Enable stl allocator tests");
|
NLMISC_VARIABLE(bool, EnableStlAllocatorChecker, "Enable stl allocator tests");
|
||||||
|
|
||||||
uintptr_t StlAllocatorMaxFree= 0;
|
uint64 StlAllocatorMaxFree = 0;
|
||||||
NLMISC_VARIABLE(uintptr_t,StlAllocatorMaxFree,"When EnableStlAllocatorChecker is true, this value gives the largest number of free blocks encountered");
|
NLMISC_VARIABLE(uint64, StlAllocatorMaxFree, "When EnableStlAllocatorChecker is true, this value gives the largest number of free blocks encountered");
|
||||||
|
|
||||||
// setup a 'max iterations' value of 3GBytes/ sizeof(void*) (32bit)
|
// setup a 'max iterations' value of 3GBytes/ sizeof(void*) (32bit)
|
||||||
// => this is equivalent to the total addressable memory space under linux
|
// => this is equivalent to the total addressable memory space under linux
|
||||||
|
@ -78,8 +78,8 @@ void testStlMemoryAllocator(const char* state)
|
||||||
// if we hit a NULL end of list terminator then return happily
|
// if we hit a NULL end of list terminator then return happily
|
||||||
if (p==NULL)
|
if (p==NULL)
|
||||||
{
|
{
|
||||||
uintptr_t numIterations= MaxIterations- counter;
|
uintptr_t numIterations = MaxIterations - counter;
|
||||||
StlAllocatorMaxFree= std::max(numIterations,StlAllocatorMaxFree);
|
StlAllocatorMaxFree = std::max((uint64)numIterations, StlAllocatorMaxFree);
|
||||||
signal(SIGSEGV, NULL);
|
signal(SIGSEGV, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ void testStlMemoryAllocator(const char* state)
|
||||||
}
|
}
|
||||||
|
|
||||||
// we just hit a crash case so setup flags / globals accordingly
|
// we just hit a crash case so setup flags / globals accordingly
|
||||||
IsCrashed= true;
|
IsCrashed = true;
|
||||||
StlMemoryAllocatorCrashPoint= state;
|
StlMemoryAllocatorCrashPoint = state;
|
||||||
signal(SIGSEGV, NULL);
|
signal(SIGSEGV, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue