Fix for platforms with macro CGAL_DONT_HAVE_MEMORY_SIZER.

This commit is contained in:
Laurent Rineau 2007-03-15 10:14:59 +00:00
parent d4f238abbe
commit f5c76d2027
1 changed files with 8 additions and 1 deletions

View File

@ -24,7 +24,9 @@ int main(int argc, char** argv)
CGAL::Timer time_insert;
CGAL::Timer time_pop;
CGAL::Timer time;
#ifndef CGAL_DONT_HAVE_MEMORY_SIZER
CGAL::Memory_sizer memory;
#endif
time.start();
for(int loop = 0; loop < number_of_loops; ++loop)
@ -42,7 +44,12 @@ int main(int argc, char** argv)
std::cerr << "Total time: " << time.time()
<< "\nTime for 'insert': " << time_insert.time()
<< "\nTime for 'pop_front': " << time_pop.time()
#ifdef CGAL_DONT_HAVE_MEMORY_SIZER
<< "\n(No CGAL memory sizer on this platform.)"
#else
<< "\nResident memory: " << memory.resident_size()
<< "\nVirtual memory: " << memory.virtual_size() << "\n";
<< "\nVirtual memory: " << memory.virtual_size()
#endif
<< "\n";
return 0;
}