[macstl-dev] gcc 3.3 on YellowDogLinux
Michael LeBlanc
leblanc at skycomputers.com
Sun Apr 3 18:46:42 WST 2005
On Apr 3, 2005, at 12:02 AM, Glen Low wrote:
> Interesting. How did you disable the destructor,
--- benchmark.cpp 23 Mar 2005 12:47:56 -0000 1.1.1.1
+++ benchmark.cpp 3 Apr 2005 10:27:17 -0000
@@ -87,7 +87,8 @@
template <template <typename> class M, typename V1, typename V2,
typename V3> inline void benchmark (const char* title)
{
clock_t std_run = bench <M <V1> > ();
- clock_t stdext_run = bench <M <V2> > ();
+// clock_t stdext_run = bench <M <V2> > ();
+ clock_t stdext_run = std_run;
clock_t raw_run = bench <M <V3> > ();
std::cout << "Benching " << title << ": "
And, Ouch!!
$ cat x.c
int main()
{
int i;
for( i=0; i<20; i++ )
printf("%08x\n",malloc(1));
return 0;
}
$ a.out
10010a68
10010a78
10010a88
10010a98
10010aa8
10010ab8
10010ac8
Linux provides memalign (boundary, size) where boundary is a power of
2. How can I make malloc(n) behave like memalign(16,n)?
More information about the macstl-dev
mailing list