Mail Archives: djgpp/1997/01/03/09:02:08
I was programming on a "big" project now, when i sometimes began getting
Floating point exeptions at random positions in the code. (Reported=20
by symify). I double and tripplechecked the code but i couldn't find
anything strange. I was using malloc to allocate mem then, but i got
suspicius and changed all malloc's to calloc's and everything worked
exactly as i wanted. So.. whats the difference between malloc
and calloc, or is it some known "feature" of malloc?
ps. i was not allocating much memory, just a couple of kb. It was
a linked list with some arrays of floats inside.
/andreas vernersson - Ume=E5, Sweden - hubb AT freenet DOT hut DOT fi - IRC: hubble
- Raw text -