www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/03/09:02:08

Date: Fri, 3 Jan 1997 14:49:13 +0100 (MET)
Message-Id: <1.5.4.16.19970103144936.0e97301e@freenet.hut.fi>
Mime-Version: 1.0
To: djgpp AT delorie DOT com
From: Andreas Vernersson <hubb AT freenet DOT hut DOT fi>
Subject: Calloc & Malloc

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019