home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!utcsri!torn!spartan.ac.BrockU.CA!brad
- From: brad@spartan.ac.BrockU.CA (Brad Saxton)
- Subject: A question about memory
- Message-ID: <1993Jan4.210804.326@spartan.ac.BrockU.CA>
- Organization: Brock University, St. Catharines Ontario
- X-Newsreader: Tin 1.1 PL4
- Date: Mon, 4 Jan 1993 21:08:04 GMT
- Lines: 18
-
- A quick question to help me in my quest to become a fair C programmer.
-
- Lets say you call an operating system function (say getpwuid) that
- returns a pointer to a structure. At some point, the information
- returned will no longer be needed, so we would like to return the memory
- to the available pool. My question is HOW?
-
- Please don't say use 'free' because that causes CORE dumps. If there
- is no way to return the memory, does it stay allocated until main
- is exitted?
-
- Please respond via e-mail and I will post the solution unless of course
- it makes me look like an idiot for asking the question. ;-)
-
- Thank you in advance for your time
-
- Brad Saxton
- brad@spartan.ac.BrockU.CA
-