20#if defined (EH_NEW_HEADERS)
30#if defined (EH_NEW_IOSTREAMS)
59#ifndef EH_NO_EXCEPTIONS
60 throw EH_STD::bad_alloc();
65#if defined (EH_HASHED_CONTAINERS_IMPLEMENTED)
66# if defined (__SGI_STL)
67# if defined (EH_NEW_HEADERS)
72# elif defined (__MSL__)
75# error what do I include to get hash_set?
78# if defined (EH_NEW_HEADERS)
85#if !defined (EH_HASHED_CONTAINERS_IMPLEMENTED)
95typedef EH_STD::hash_set<void*, ::hash_void, EH_STD::equal_to<void*> >
allocation_set;
106#if !defined (NO_FAST_ALLOCATOR)
174#if !defined (NO_FAST_ALLOCATOR)
180 return (
char*)EH_CSTD::malloc(
s);
206#ifdef EH_DELETE_HAS_THROW_SPEC
207throw(EH_STD::bad_alloc)
212void*
_STLP_CALL operator new(
size_t size,
const EH_STD::nothrow_t&)
throw() {
227# ifdef EH_USE_NOTHROW
228void*
_STLP_CALL operator new[](
size_t size,
const EH_STD::nothrow_t&)
throw() {
239{
operator delete(
ptr ); }
242#if defined (EH_DELETE_HAS_THROW_SPEC)
254 allocation_set::iterator
p =
alloc_set().find( (
char*)
s );
260# if ! defined (NO_FAST_ALLOCATOR)
267#if defined (EH_DELETE_HAS_THROW_SPEC)
296 EH_STD::cerr<<
"\nEH TEST FAILURE !\n";
299 EH_STD::cerr <<
"ERROR : " <<
alloc_count <<
" outstanding allocations.\n";
301 EH_STD::cerr <<
"ERROR : " <<
object_count <<
" non-destroyed objects.\n";
323 EH_STD::cerr<<EH_STD::endl;
325 EH_STD::cerr<<
" ... ";
330 EH_STD::cerr<<(
count+1)<<
" try successful"<<EH_STD::endl;
335 return failure_threshold;
#define USING_CSTD_NAME(name)
static void * Allocate(size_t s)
static bool Free(void *p)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLboolean GLboolean GLboolean b
EH_STD::hash_set< void *, ::hash_void, EH_STD::equal_to< void * > > allocation_set
TestController gTestController
static bool using_alloc_set
static void * OperatorNew(size_t s)
char * AllocateBlock(size_t s)
static FastAllocator gFastAllocator
static allocation_set & alloc_set()
void simulate_possible_failure()
char dummy2[kMinBlockSize]
static const char * current_container
static bool ReportLeaked()
static const char * current_test_category
static const char * current_test
static void PrintTestName(bool err=false)
static void EndLeakDetection()
static long & Failure_threshold()
static bool TrackingEnabled()
static bool track_allocations
static bool LeakDetectionEnabled()
static long possible_failure_count
static bool leak_detection_enabled
static void ReportSuccess(int)
static void ClearAllocationSet()
static void maybe_fail(long)
size_t operator()(void *x) const