Re: memorize

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 10/05/97

On Thu, 2 Oct 1997, Daniel Koepke wrote:

>Uhm, what's the point?  calloc() is just malloc() that takes
>an extra parameter.  They do (essentially) the same thing.
>  data = (type *) calloc(sizeof(type), elements);
>is (again, essentially) the same as
>  data = (type *) malloc(sizeof(type)*elements);

Except calloc zero's out the bytes.

The point is that you should use the CREATE macro so that you can change it
later if you want to do something, like say, log allocations.

George Greer  -   | Genius may have its limitations, but stupidity | is not thus handicapped. -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST