Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!pacbell.com!pacbell!barn!everexn!roger From: roger@everexn.uucp (Roger House) Newsgroups: comp.lang.c Subject: Re: Question about malloc() and free() Message-ID: <1990Aug27.184058.1936@everexn.uucp> Date: 27 Aug 90 18:40:58 GMT References: <118073@linus.mitre.org> Organization: Everex Systems, Inc. Lines: 13 In <118073@linus.mitre.org> rtidd@ccels3.mitre.org (Randy Tidd) writes: >What happens to the space that was malloc'ed? It is never freed by me; >will the compiler figure this out and arrange for it to be freed? Is >the resolution method standard over compilers? The compiler will NOT figure out that something can be freed and then free it. Most likely the compiler has no idea that malloc is allocating memory.l The compiler simply compiles the code needed to pass the parameters and call the function. It is up to the programmer to take care of freeing mem- ory allocated by the programmer. Roger House