assert, include path, and virtual ~ patches by Lukas Fittl
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@414 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
d5a206bb96
commit
c65487fd89
6 changed files with 19 additions and 13 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define LOKI_SMALL_OBJECT_USE_NEW_ARRAY
|
||||
|
||||
#include "../../include/loki/SmallObj.h"
|
||||
#include <loki/SmallObj.h>
|
||||
#include "timer.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -255,7 +255,7 @@ void testSize()
|
|||
typedef BoostPoolNew<Size> D;
|
||||
#endif
|
||||
|
||||
assert( !Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted() );
|
||||
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
||||
cout << endl << endl;
|
||||
cout << "Allocator Benchmark Tests with " << Size << " bytes big objects " << endl;
|
||||
cout << endl;
|
||||
|
@ -278,25 +278,25 @@ void testSize()
|
|||
|
||||
cout << loop << " times ";
|
||||
LOKI_SMALLOBJBECH_ABCD(delete_new ,0,loop,t,"'delete new T'");
|
||||
assert( !Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted() );
|
||||
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
||||
|
||||
cout << "N=" << N <<" : " << loop << " times ";
|
||||
LOKI_SMALLOBJBECH_ABCD(delete_new_array ,N,loop,t,"'delete[] new T[N]'");
|
||||
assert( !Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted() );
|
||||
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
||||
|
||||
cout << "i=0..." << Narr << " : ";
|
||||
LOKI_SMALLOBJBECH_ABCD(new_del_on_arr ,0,Narr,t,"1. 'arr[i] = new T' 2. 'delete arr[i]'");
|
||||
assert( !Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted() );
|
||||
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
||||
|
||||
cout << "i=0..." << Narr << ", N=" << N <<" : ";
|
||||
LOKI_SMALLOBJBECH_ABCD(new_del_a_on_a ,N,Narr,t,"1. 'arr[i] = new T[N]' 2. 'delete[] arr[i]'");
|
||||
assert( !Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted() );
|
||||
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
||||
|
||||
|
||||
delete [] a;
|
||||
|
||||
cout << "_________________________________________________________________" << endl;
|
||||
assert( !Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted() );
|
||||
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
||||
Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::ClearExtraMemory();
|
||||
}
|
||||
|
||||
|
@ -324,6 +324,9 @@ int main()
|
|||
// ----------------------------------------------------------------------------
|
||||
|
||||
// $Log$
|
||||
// Revision 1.18 2006/01/05 09:55:09 syntheticpp
|
||||
// assert, include path, and virtual ~ patches by Lukas Fittl
|
||||
//
|
||||
// Revision 1.17 2006/01/04 23:54:30 syntheticpp
|
||||
// remove system(PAUSE) for gcc, Thanks to Lukas Fittl
|
||||
//
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
// $Header$
|
||||
|
||||
|
||||
#include "../../include/loki/SmallObj.h"
|
||||
#include "../../include/loki/Singleton.h"
|
||||
#include <loki/SmallObj.h>
|
||||
#include <loki/Singleton.h>
|
||||
#include <iostream>
|
||||
|
||||
// define DO_EXTRA_LOKI_TESTS in src/SmallObj.cpp to get
|
||||
|
@ -366,6 +366,9 @@ int main()
|
|||
// ----------------------------------------------------------------------------
|
||||
|
||||
// $Log$
|
||||
// Revision 1.13 2006/01/05 09:55:09 syntheticpp
|
||||
// assert, include path, and virtual ~ patches by Lukas Fittl
|
||||
//
|
||||
// Revision 1.12 2006/01/04 23:54:30 syntheticpp
|
||||
// remove system(PAUSE) for gcc, Thanks to Lukas Fittl
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue