home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11989 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.9 KB  |  47 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!osiris.cso.uiuc.edu!hmiller
  3. From: hmiller@osiris.cso.uiuc.edu (Harry Miller)
  4. Subject: Re: BC++ TV Stream Manager..
  5. References: <726291562.0@ttlg.ttlg.UUCP>
  6. Message-ID: <C0pBuv.DJv@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Mon, 11 Jan 1993 18:11:18 GMT
  10. Lines: 35
  11.  
  12. Neal.Sanche@ttlg.UUCP (Neal Sanche) writes:
  13.  
  14. >I would like to know why the BC++ Turbo Vision stream manager causes 
  15. >memory losses every time I instantiate a TResourceFile object and then 
  16. >immediately destroy it? 
  17. >Is there something that the TV Stream manager does behind the scenes 
  18. >that cause it to reserve memory for itself and then not deallocate 
  19. >it? 
  20. >Any insight would be appreciated. I'd like to know how the stream manager 
  21. >works to be assured that I'm not going to eventually run out of heap 
  22. >memory whenever objects are read from and written to streams. 
  23. >-Neal 
  24.  
  25. Make sure the allocation routine is not reserving the memory for future use.
  26. Many allocation schemes do this to improve performance. The functions
  27. coreleft and farcoreleft, will not report this saved memory, you need to
  28. use the heap functions to find this saved memory. I've never done this
  29. myself, but I have seen some code to do this.
  30.  
  31. Another consideration:
  32. Is the instantiation (sp?) of your TResourceFile class the very first
  33. instantiation (there's that word again). If it is, your memory loss may
  34. be from the stream manager's initialization of your streamable class.
  35. I do not think the ste stream manager releases this memory, in case it
  36. might be needed later on.
  37.  
  38. Well, a few thought to look at (how do you see thoughts!).
  39.  
  40. Harry E. Miller ----------------- just a jerk lurking on the net
  41. hmiller@osiris.cso.uiuc.edu ----- where to send the hate mail
  42.  
  43.