Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!paperboy!think.com!samsung!caen!uflorida!cs.fau.edu!jeffb From: jeffb.bbs@shark.cs.fau.edu (Jeffrey Boser) Newsgroups: comp.sys.mac.programmer Subject: Re: Novice question about malloc() in Think C Message-ID: <7i0XX1w163w@shark.cs.fau.edu> Date: 26 Feb 91 00:21:53 GMT References: <5145@umbc3.UMBC.EDU> Sender: bbs@cs.fau.edu (Waffle BBS) Organization: Florida Atlantic University Lines: 25 cs483106@umbc5.umbc.edu (cs483106) writes: > In article <12591@helios.TAMU.EDU> n138ct@tamuts.tamu.edu (Brent Burton) writ > >What I did was to surround every malloc() call with this: > >#ifdef THINK_C > > x = (char *)NewPtr((long)sizeof(char)); > >#else > > x = (char *)malloc(sizeof(char)); > >#endif > I too have had problems with THINK C's malloc. I have taken the easy way out > and simply ripped everything out of alloc.c, and replaced it with glue code > to the Inside Mac equivalents. (I got too annoyed at doing a #define for ever > malloc I used!) ahehm! listen up folks: THINK C Standard Libraries Reference, convieniently under malloc: #include void *malloc(size_t size); come on! if you do not include the header file, how can you expect it to work? .....Jeff