|
From: <Mi...@gm...> - 2005-02-20 08:51:33
|
>Do you declare any large automatic arrays?
>
> something like:
>
> int func(void) {
> int bigarray[1000000];
> func2();
> }
>
> Valgrind has a heuristic to try to detect stack switches - this warning
> means it fired. If you aren"t switching stacks, something like the
> above is likely to be the reason (and may explain crashes on platforms
> which aren"t able to allocate large amounts of extra stack on demand).
>
> Cheers,
> Olly
Thanks, Olly, that led me on the right way! The MAXTEST variable was in fact
one dimension of a large float array, that gets defined a couple of lines
down the code. Since MAXTEST never changes, the compiler obviously pulled
that allocation up in front. The array was 1000*256*sizeof(float), and when
I changed MAXTEST testwise to 100, all went ok.
I will have to split up that array into a bunch of local allocations with
new(), and do hope it will be okay with Windows, too.
Miq.
--
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl
|