Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: What happens when realloc() returns NULL? Message-ID: <10894@smoke.BRL.MIL> Date: 31 Aug 89 22:40:00 GMT References: Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 6 In article tom@yang.cpac.washington.edu (Tom May) writes: > p2 = realloc (p1, 200); >... realloc() returns NULL, is the memory pointed to by p1 still allocated? Yes, a properly implemented realloc() will not lose the old storage when it cannot perform the reallocation.