I am not sure if this is a linux problem or a gcc problem. I am using
gcc version 2.3.3 and libc (and libm) version 4.3.3. I have a program
which I wrote that performs a lot of floating point math in a loop.
It does not use malloc therefore it should use a constant amount of
memory. The program then writes this data to stdout (a total of about
2M of ascii). On a sun 4 using cc the program uses 0.7% mem (by
comparison "ps -u" used 1.0% mem). On my linux box with 8M and a 16M
swap disk I use up all of the memory (real and swap)! The only other
program running is X (6M or so). Also if I leave sysinfo running I
can see that the program steadily uses up more and more memory. The
program is compiled with -m486 as the only option and -lm as the only
lib.
Since the problem does not exist on the Sun 4 I think that it is a
linux or gcc problem not a bug in my code (famous last words).
Note that the program runs it just uses about 17M to much.
Any ideas?
Rich
p.s. Is there a libhard that goes with the 4.3.3 libs? I could not
find one so I am using libm.so.4.3.3. RDY