Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site sdcc13.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!ittvax!dcdwest!sdcsvax!sdcc3!sdcc13!ee163acp From: ee163acp@sdcc13.UUCP (DARIN JOHNSON) Newsgroups: net.unix Subject: calloc vs. malloc Message-ID: <213@sdcc13.UUCP> Date: Sat, 27-Apr-85 17:31:06 EDT Article-I.D.: sdcc13.213 Posted: Sat Apr 27 17:31:06 1985 Date-Received: Wed, 1-May-85 03:06:23 EDT Organization: U.C. San Diego, Academic Computer Center Lines: 11 Keywords: alloc There was a question on mod.unix (or something like that) about whether interchanging malloc and calloc calls was portable. Well I had a problem with that just yesterday and it took quite a while to figure out. On the pyramid OSx it seems that if free() is called with something calloc()'d it doesn't do what is expected. I try to keep this consistent, but I called free() instead of cfree() in one place, and then later when calling malloc, it returned something still in use. Replacing this free() with cfree() immediately solved the problem. Darin Johnson UCSD