Mail Archives: djgpp/1993/07/06/09:09:40
Hello all,
I have encountered something strange when using DJGPP 1.09, or I think I
should say the GCC 2.2.2 that comes along with it.
I have this huge source file (resulting in an object file of > 60kB), in
a multi-threading application. I observed strange behaviour wrt the
stack of one of the threads and found the problem was in this source
file. Inspecting the generated assembly I found that the compiler
generated code that allocated 32kB space on the stack. I figured (don't
ask me why, I guess it's intuition) that this might have something to do
with the fact that no other routines were called from this code, and I
inserted a call to fflush(). This resulted in a stack space allocation
of only 4kB, still too much, but better. Then I tried using the -O
option, and now only 240 bytes were allocated, which seems to be OK.
So I guess I could use optimisation all the way, but this results in
very long compilation times, which I don't want during development of my
application.
Is there another solution, and is this a known problem of gcc?
Thanks,
Rob Hegt
- Raw text -