2005-10-06 10:17:56 +00:00
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// The Loki Library
|
|
|
|
|
// Copyright (c) 2005 Peter K<>mmel
|
|
|
|
|
// Copyright (c) 2005 Richard Sposato
|
|
|
|
|
// Permission to use, copy, modify, distribute and sell this software for any
|
|
|
|
|
// purpose is hereby granted without fee, provided that the above copyright
|
|
|
|
|
// notice appear in all copies and that both that copyright notice and this
|
|
|
|
|
// permission notice appear in supporting documentation.
|
|
|
|
|
// The authors make no representations about the
|
|
|
|
|
// suitability of this software for any purpose. It is provided "as is"
|
|
|
|
|
// without express or implied warranty.
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-10-14 18:35:06 +00:00
|
|
|
|
// $Header$
|
|
|
|
|
|
2005-09-26 07:33:05 +00:00
|
|
|
|
//#define LOKI_CLASS_LEVEL_THREADING
|
2005-10-27 19:10:32 +00:00
|
|
|
|
//#define LOKI_OBJECT_LEVEL_THREADING
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-10-26 23:30:06 +00:00
|
|
|
|
#define LOKI_SMALL_OBJECT_USE_NEW_ARRAY
|
2005-09-27 17:04:30 +00:00
|
|
|
|
|
2006-01-05 09:55:09 +00:00
|
|
|
|
#include <loki/SmallObj.h>
|
2005-08-27 13:05:20 +00:00
|
|
|
|
#include "timer.h"
|
|
|
|
|
|
2005-10-14 18:35:06 +00:00
|
|
|
|
#include <iostream>
|
2005-08-27 13:05:20 +00:00
|
|
|
|
#include <string>
|
|
|
|
|
|
2005-10-29 12:38:22 +00:00
|
|
|
|
//#define COMPARE_BOOST_POOL
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#ifdef COMPARE_BOOST_POOL
|
2005-10-30 14:03:23 +00:00
|
|
|
|
#include <boost\pool\object_pool.hpp>
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2005-08-27 13:05:20 +00:00
|
|
|
|
using namespace std;
|
2005-10-29 12:38:22 +00:00
|
|
|
|
|
|
|
|
|
|
2005-10-26 23:30:06 +00:00
|
|
|
|
template<unsigned int N>
|
2005-08-27 13:05:20 +00:00
|
|
|
|
class ThisIsASmallObject
|
|
|
|
|
{
|
2005-10-30 14:03:23 +00:00
|
|
|
|
char data[N];
|
2005-10-29 12:38:22 +00:00
|
|
|
|
};
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
template<unsigned int N, class T>
|
2005-10-29 12:38:22 +00:00
|
|
|
|
struct Base : public ThisIsASmallObject<N>, public T
|
|
|
|
|
{};
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
template<unsigned int N>
|
2005-10-29 12:38:22 +00:00
|
|
|
|
struct Base<N, void> : public ThisIsASmallObject<N>
|
|
|
|
|
{};
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
|
|
|
|
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#ifdef COMPARE_BOOST_POOL
|
|
|
|
|
|
2005-10-26 23:30:06 +00:00
|
|
|
|
template<unsigned int N>
|
|
|
|
|
class BoostPoolNew : public Base<N,void>
|
2005-10-26 00:41:00 +00:00
|
|
|
|
{
|
|
|
|
|
private:
|
2005-10-30 14:03:23 +00:00
|
|
|
|
static boost::object_pool< BoostPoolNew<N> > BoostPool;
|
2005-10-26 00:41:00 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2005-10-30 14:03:23 +00:00
|
|
|
|
/// Throwing single-object new throws bad_alloc when allocation fails.
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#ifdef _MSC_VER
|
2005-10-30 14:03:23 +00:00
|
|
|
|
/// @note MSVC complains about non-empty exception specification lists.
|
|
|
|
|
static void * operator new ( std::size_t )
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#else
|
2005-10-30 14:03:23 +00:00
|
|
|
|
static void * operator new ( std::size_t ) throw ( std::bad_alloc )
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#endif
|
2005-10-30 14:03:23 +00:00
|
|
|
|
{
|
|
|
|
|
return BoostPool.malloc();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Non-throwing single-object new returns NULL if allocation fails.
|
|
|
|
|
static void * operator new ( std::size_t, const std::nothrow_t & ) throw ()
|
|
|
|
|
{
|
|
|
|
|
return BoostPool.malloc();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Placement single-object new merely calls global placement new.
|
|
|
|
|
inline static void * operator new ( std::size_t size, void * place )
|
|
|
|
|
{
|
|
|
|
|
return ::operator new( size, place );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Single-object delete.
|
|
|
|
|
static void operator delete ( void * p ) throw ()
|
|
|
|
|
{
|
|
|
|
|
BoostPool.free( reinterpret_cast< BoostPoolNew * >( p ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Non-throwing single-object delete is only called when nothrow
|
|
|
|
|
new operator is used, and the constructor throws an exception.
|
|
|
|
|
*/
|
|
|
|
|
static void operator delete ( void * p, const std::nothrow_t & ) throw()
|
|
|
|
|
{
|
|
|
|
|
BoostPool.free( reinterpret_cast< BoostPoolNew * >( p ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Placement single-object delete merely calls global placement delete.
|
|
|
|
|
inline static void operator delete ( void * p, void * place )
|
|
|
|
|
{
|
|
|
|
|
::operator delete ( p, place );
|
|
|
|
|
}
|
2005-10-26 00:41:00 +00:00
|
|
|
|
|
2005-11-02 01:46:04 +00:00
|
|
|
|
/** @note This class does not provide new [] and delete [] operators since
|
|
|
|
|
the Boost.Pool allocator only works for memory requests of the same size.
|
|
|
|
|
*/
|
2005-10-26 00:41:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
2005-10-26 23:30:06 +00:00
|
|
|
|
template<unsigned int N>
|
|
|
|
|
boost::object_pool< BoostPoolNew<N> > BoostPoolNew<N>::BoostPool;
|
2005-10-26 00:41:00 +00:00
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-10-29 12:38:22 +00:00
|
|
|
|
int array_test_nr = 0;
|
|
|
|
|
double t100_new = 0;
|
|
|
|
|
double t100_delete = 0;
|
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
#define LOKI_SMALLOBJ_BENCH(FUNC, CODE_LOOP) \
|
|
|
|
|
template<class T, int TN> \
|
|
|
|
|
int FUNC(void**, const int N, int loop, Timer& t, const char* s) \
|
|
|
|
|
{ \
|
|
|
|
|
t.start(); \
|
|
|
|
|
/****************************************************************/ \
|
|
|
|
|
for (int i=0; i<loop; ++i) \
|
|
|
|
|
{ \
|
|
|
|
|
CODE_LOOP \
|
|
|
|
|
} \
|
|
|
|
|
/****************************************************************/ \
|
|
|
|
|
t.stop(); \
|
|
|
|
|
if(array_test_nr==0) \
|
|
|
|
|
t.t100 = t.t(); \
|
|
|
|
|
array_test_nr++; \
|
|
|
|
|
t.print(t.t(),s); \
|
|
|
|
|
return t.t(); \
|
2005-08-27 13:05:20 +00:00
|
|
|
|
}
|
2005-10-30 14:33:33 +00:00
|
|
|
|
#ifdef COMPARE_BOOST_POOL
|
|
|
|
|
#define LOKI_BOOST_TEST_NR 3
|
|
|
|
|
#else
|
|
|
|
|
#define LOKI_BOOST_TEST_NR -1
|
|
|
|
|
#endif
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
#define LOKI_SMALLOBJ_BENCH_ARRAY(FUNC, CODE_DECL, CODE_NEW, CODE_DELETE) \
|
|
|
|
|
template<class T, int TN> \
|
|
|
|
|
int FUNC(void** arrv, const int N, int loop, Timer& t, const char* s) \
|
|
|
|
|
{ \
|
|
|
|
|
\
|
|
|
|
|
CODE_DECL; \
|
|
|
|
|
T** arr = reinterpret_cast<T**>(arrv); \
|
|
|
|
|
t.start(); \
|
|
|
|
|
/****************************************************************/ \
|
|
|
|
|
for (int i=0; i<loop; ++i) \
|
|
|
|
|
{ \
|
|
|
|
|
CODE_NEW \
|
|
|
|
|
} \
|
|
|
|
|
/****************************************************************/ \
|
|
|
|
|
t.stop(); \
|
|
|
|
|
cout << "1. "; \
|
|
|
|
|
if(array_test_nr==0) \
|
|
|
|
|
{ \
|
|
|
|
|
t.t100 = t.t(); \
|
|
|
|
|
t100_new = t.t100; \
|
|
|
|
|
} \
|
|
|
|
|
else \
|
|
|
|
|
t.t100 = t100_new; \
|
|
|
|
|
t.print(t.t(),s); \
|
|
|
|
|
\
|
2005-10-30 14:33:33 +00:00
|
|
|
|
if(array_test_nr==LOKI_BOOST_TEST_NR) \
|
2005-10-30 14:03:23 +00:00
|
|
|
|
{ \
|
|
|
|
|
cout << \
|
|
|
|
|
"2. boost :\tboost::object_pool is not tested because it's too slow"\
|
|
|
|
|
<< endl << endl; \
|
|
|
|
|
array_test_nr++; \
|
|
|
|
|
return t.t(); \
|
|
|
|
|
} \
|
|
|
|
|
t.start(); \
|
|
|
|
|
/****************************************************************/ \
|
|
|
|
|
for (int i=0; i<loop; ++i) \
|
|
|
|
|
{ \
|
|
|
|
|
CODE_DELETE \
|
|
|
|
|
} \
|
|
|
|
|
/****************************************************************/ \
|
|
|
|
|
t.stop(); \
|
|
|
|
|
cout << "2. "; \
|
|
|
|
|
if(array_test_nr==0) \
|
|
|
|
|
{ \
|
|
|
|
|
t.t100 = t.t(); \
|
|
|
|
|
t100_delete = t.t100; \
|
|
|
|
|
} \
|
|
|
|
|
else \
|
|
|
|
|
t.t100 = t100_delete; \
|
|
|
|
|
t.print(t.t(),s); \
|
|
|
|
|
array_test_nr++; \
|
|
|
|
|
cout << endl; \
|
|
|
|
|
return t.t(); \
|
2005-10-06 00:20:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH(delete_new ,delete new T;)
|
2006-01-19 23:11:57 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH(delete_new_mal ,std::free(std::malloc(sizeof(T)));)
|
2005-10-30 14:03:23 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH(delete_new_all ,std::allocator<T> st;st.deallocate(st.allocate(1), 1);)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH(delete_new_array ,delete[] new T[N];)
|
2006-01-19 23:11:57 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH(delete_new_array_mal,std::free(std::malloc(sizeof(T[TN])));)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH(delete_new_array_all,std::allocator<T[TN]> st;st.deallocate(st.allocate(1), 1);)
|
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH_ARRAY(new_del_on_arr , , arr[i] = new T; ,
|
|
|
|
|
delete arr[i];)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH_ARRAY(new_del_on_arr_mal, , arr[i] = static_cast<T*>(std::malloc(sizeof(T))); ,
|
2005-10-30 14:03:23 +00:00
|
|
|
|
std::free(arr[i]);)
|
|
|
|
|
LOKI_SMALLOBJ_BENCH_ARRAY(new_del_on_arr_all, std::allocator<T> st ,
|
|
|
|
|
arr[i]=st.allocate(1); ,
|
|
|
|
|
st.deallocate(arr[i], 1);)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH_ARRAY(new_del_a_on_a , , arr[i] = new T[TN]; ,
|
|
|
|
|
delete[] arr[i];)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH_ARRAY(new_del_a_on_a_mal, , arr[i] = static_cast<T*>(std::malloc(sizeof(T[TN]))); ,
|
2005-10-30 14:03:23 +00:00
|
|
|
|
std::free(arr[i]);)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
LOKI_SMALLOBJ_BENCH_ARRAY(new_del_a_on_a_all,std::allocator<T[TN]> st ,
|
2005-10-30 14:03:23 +00:00
|
|
|
|
arr[i]=reinterpret_cast<T*>(st.allocate(1)); ,
|
|
|
|
|
st.deallocate(reinterpret_cast<T(*)[TN]>(arr[i]), 1);)
|
2005-10-29 12:38:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef COMPARE_BOOST_POOL
|
2005-10-30 14:03:23 +00:00
|
|
|
|
#define LOKI_SMALLOBJBECH_ABCD(FUNC,N,LOOP,TIMER,MESSAGE) \
|
|
|
|
|
array_test_nr = 0; \
|
|
|
|
|
cout << MESSAGE << endl; \
|
|
|
|
|
FUNC<A,N>(a,N,LOOP,TIMER,"new :"); \
|
|
|
|
|
FUNC<B,N>(a,N,LOOP,TIMER,"SmallObj :"); \
|
|
|
|
|
FUNC<C,N>(a,N,LOOP,TIMER,"ValueObj :"); \
|
|
|
|
|
FUNC##_all<A,N>(a,N,LOOP,TIMER,"allocator:"); \
|
|
|
|
|
FUNC##_mal<A,N>(a,N,LOOP,TIMER,"malloc :"); \
|
|
|
|
|
cout << endl << endl;
|
2005-10-29 12:38:22 +00:00
|
|
|
|
#else
|
2005-10-30 14:03:23 +00:00
|
|
|
|
#define LOKI_SMALLOBJBECH_ABCD(FUNC,N,LOOP,TIMER,MESSAGE) \
|
|
|
|
|
array_test_nr = 0; \
|
|
|
|
|
cout << MESSAGE << endl; \
|
|
|
|
|
FUNC<A,N>(a,N,LOOP,TIMER,"new :"); \
|
|
|
|
|
FUNC<B,N>(a,N,LOOP,TIMER,"SmallObj :"); \
|
|
|
|
|
FUNC<C,N>(a,N,LOOP,TIMER,"ValueObj :"); \
|
|
|
|
|
FUNC<D,N>(a,N,LOOP,TIMER,"boost :"); \
|
|
|
|
|
FUNC##_all<A,N>(a,N,LOOP,TIMER,"allocator:"); \
|
|
|
|
|
FUNC##_mal<A,N>(a,N,LOOP,TIMER,"malloc :"); \
|
|
|
|
|
cout << endl << endl;
|
2005-10-29 12:38:22 +00:00
|
|
|
|
#endif
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2005-12-08 22:23:33 +00:00
|
|
|
|
#define LOKI_ALLOCATOR_PARAMETERS Loki::SingleThreaded, 4096, 32, 4, Loki::NoDestroy
|
|
|
|
|
|
2005-10-27 19:10:32 +00:00
|
|
|
|
template<unsigned int Size, int loop>
|
2005-10-26 23:30:06 +00:00
|
|
|
|
void testSize()
|
2005-10-26 00:41:00 +00:00
|
|
|
|
{
|
2005-10-30 14:03:23 +00:00
|
|
|
|
typedef Base<Size, void> A;
|
2005-12-08 22:23:33 +00:00
|
|
|
|
typedef Base<Size, Loki::SmallObject< LOKI_ALLOCATOR_PARAMETERS > > B;
|
|
|
|
|
typedef Base<Size, Loki::SmallValueObject< LOKI_ALLOCATOR_PARAMETERS > > C;
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#ifdef COMPARE_BOOST_POOL
|
2005-10-30 14:03:23 +00:00
|
|
|
|
typedef BoostPoolNew<Size> D;
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#endif
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
2006-01-05 09:55:09 +00:00
|
|
|
|
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
2005-10-30 14:03:23 +00:00
|
|
|
|
cout << endl << endl;
|
|
|
|
|
cout << "Allocator Benchmark Tests with " << Size << " bytes big objects " << endl;
|
|
|
|
|
cout << endl;
|
|
|
|
|
cout << "new = global new/delete \tsizeof(A) = " << sizeof(A) << endl;
|
|
|
|
|
cout << "SmallObj = Loki::SmallObject \tsizeof(B) = " << sizeof(B) << endl;
|
|
|
|
|
cout << "ValueObj = Loki::SmallValueObject\tsizeof(C) = " << sizeof(C) << endl;
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#ifdef COMPARE_BOOST_POOL
|
2005-10-30 14:03:23 +00:00
|
|
|
|
cout << "boost = boost::object_pool \tsizeof(D) = " << sizeof(D) << endl;
|
2005-10-26 00:41:00 +00:00
|
|
|
|
#endif
|
2005-10-30 14:03:23 +00:00
|
|
|
|
cout << "allocator= std::allocator \tsizeof(A) = " << sizeof(A) << endl;
|
|
|
|
|
cout << "malloc = std::malloc/free \tsizeof(A) = " << sizeof(A) << endl;
|
|
|
|
|
cout << endl << endl;
|
2005-10-06 00:20:24 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
Timer t;
|
2005-10-06 00:20:24 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
const int N = 3;
|
|
|
|
|
int Narr = 1000*1000;
|
2005-10-06 00:20:24 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
void** a= new void*[Narr];
|
2005-10-06 00:20:24 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
cout << loop << " times ";
|
|
|
|
|
LOKI_SMALLOBJBECH_ABCD(delete_new ,0,loop,t,"'delete new T'");
|
2006-01-05 09:55:09 +00:00
|
|
|
|
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
2005-10-30 14:03:23 +00:00
|
|
|
|
|
|
|
|
|
cout << "N=" << N <<" : " << loop << " times ";
|
|
|
|
|
LOKI_SMALLOBJBECH_ABCD(delete_new_array ,N,loop,t,"'delete[] new T[N]'");
|
2006-01-05 09:55:09 +00:00
|
|
|
|
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
2005-10-06 00:20:24 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
cout << "i=0..." << Narr << " : ";
|
|
|
|
|
LOKI_SMALLOBJBECH_ABCD(new_del_on_arr ,0,Narr,t,"1. 'arr[i] = new T' 2. 'delete arr[i]'");
|
2006-01-05 09:55:09 +00:00
|
|
|
|
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
2005-10-30 14:03:23 +00:00
|
|
|
|
|
|
|
|
|
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]'");
|
2006-01-05 09:55:09 +00:00
|
|
|
|
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
2005-10-06 00:20:24 +00:00
|
|
|
|
|
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
delete [] a;
|
|
|
|
|
|
|
|
|
|
cout << "_________________________________________________________________" << endl;
|
2006-01-05 09:55:09 +00:00
|
|
|
|
assert( (!Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::IsCorrupted()) );
|
2005-12-08 22:23:33 +00:00
|
|
|
|
Loki::AllocatorSingleton< LOKI_ALLOCATOR_PARAMETERS >::ClearExtraMemory();
|
2005-10-26 23:30:06 +00:00
|
|
|
|
}
|
2005-08-27 13:05:20 +00:00
|
|
|
|
|
|
|
|
|
|
2005-10-26 23:30:06 +00:00
|
|
|
|
int main()
|
|
|
|
|
{
|
2005-10-30 14:03:23 +00:00
|
|
|
|
const int loop = 1000*1000;
|
2005-10-29 12:38:22 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
cout << endl;
|
2005-10-26 23:30:06 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
testSize< 2,loop>();
|
|
|
|
|
testSize< 3,loop>();
|
|
|
|
|
testSize< 8,loop>();
|
|
|
|
|
testSize< 9,loop>();
|
|
|
|
|
testSize<16,loop>();
|
|
|
|
|
testSize<17,loop>();
|
2005-10-26 23:30:06 +00:00
|
|
|
|
|
2006-01-04 23:54:30 +00:00
|
|
|
|
#if defined(__BORLANDC__) || defined(_MSC_VER)
|
|
|
|
|
system("PAUSE");
|
2005-10-29 12:38:22 +00:00
|
|
|
|
#endif
|
2005-10-26 23:30:06 +00:00
|
|
|
|
|
2005-10-30 14:03:23 +00:00
|
|
|
|
return 0;
|
2005-08-27 13:05:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
2005-10-14 18:35:06 +00:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// $Log$
|
2006-01-19 23:11:57 +00:00
|
|
|
|
// Revision 1.19 2006/01/19 23:11:57 lfittl
|
|
|
|
|
// - Disabled -Weffc++ flag, fixing these warnings produces too much useless code
|
|
|
|
|
// - Enabled -pedantic, -Wold-style-cast and -Wundef for src/ and test/
|
|
|
|
|
//
|
2006-01-05 09:55:09 +00:00
|
|
|
|
// Revision 1.18 2006/01/05 09:55:09 syntheticpp
|
|
|
|
|
// assert, include path, and virtual ~ patches by Lukas Fittl
|
|
|
|
|
//
|
2006-01-04 23:54:30 +00:00
|
|
|
|
// Revision 1.17 2006/01/04 23:54:30 syntheticpp
|
|
|
|
|
// remove system(PAUSE) for gcc, Thanks to Lukas Fittl
|
|
|
|
|
//
|
2005-12-08 22:23:33 +00:00
|
|
|
|
// Revision 1.16 2005/12/08 22:23:33 rich_sposato
|
|
|
|
|
// Added checks for whether loki's allocator is corrupted.
|
|
|
|
|
//
|
2005-11-02 01:46:04 +00:00
|
|
|
|
// Revision 1.15 2005/11/02 01:46:04 rich_sposato
|
|
|
|
|
// Added explanatory comment about why class has no new [] and delete []
|
|
|
|
|
// operators. Removed other comment which is now useless.
|
|
|
|
|
//
|
2005-10-30 14:33:33 +00:00
|
|
|
|
// Revision 1.14 2005/10/30 14:33:33 syntheticpp
|
|
|
|
|
// test correct also when boost is disabled
|
|
|
|
|
//
|
2005-10-30 14:03:23 +00:00
|
|
|
|
// Revision 1.13 2005/10/30 14:03:23 syntheticpp
|
|
|
|
|
// replace tabs space
|
|
|
|
|
//
|
2005-10-29 12:38:22 +00:00
|
|
|
|
// Revision 1.12 2005/10/29 12:38:22 syntheticpp
|
|
|
|
|
// replace with new implementation
|
|
|
|
|
//
|
2005-10-29 10:21:46 +00:00
|
|
|
|
// Revision 1.11 2005/10/29 10:21:46 syntheticpp
|
|
|
|
|
// find loki include files without a correct sreach pathand some small fixes
|
|
|
|
|
//
|
2005-10-27 19:10:32 +00:00
|
|
|
|
// Revision 1.10 2005/10/27 19:10:32 syntheticpp
|
|
|
|
|
// gcc fix
|
|
|
|
|
//
|
2005-10-26 23:30:06 +00:00
|
|
|
|
// Revision 1.9 2005/10/26 23:30:06 syntheticpp
|
|
|
|
|
// make object size more flexible
|
|
|
|
|
//
|
2005-10-26 00:41:00 +00:00
|
|
|
|
// Revision 1.8 2005/10/26 00:41:00 rich_sposato
|
|
|
|
|
// Added comparison to boost::pool memory allocator.
|
|
|
|
|
//
|
2005-10-14 18:35:06 +00:00
|
|
|
|
// Revision 1.7 2005/10/14 18:35:06 rich_sposato
|
|
|
|
|
// Added cvs keywords.
|
|
|
|
|
//
|
2005-10-26 23:30:06 +00:00
|
|
|
|
|
|
|
|
|
|