home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19202 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.0 KB  |  29 lines

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