🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7589

Re: BC++ TV Stream Manager..

#7589
From: Harry Miller
Date: Mon, 11 Jan 1993 18:11
34 lines
1992 bytes
Neal.Sanche@ttlg.UUCP (Neal Sanche) writes:

>I would like to know why the BC++ Turbo Vision stream manager causes 
>memory losses every time I instantiate a TResourceFile object and then 
>immediately destroy it? 
> 
>Is there something that the TV Stream manager does behind the scenes 
>that cause it to reserve memory for itself and then not deallocate 
>it? 
> 
>Any insight would be appreciated. I'd like to know how the stream manager 
>works to be assured that I'm not going to eventually run out of heap 
>memory whenever objects are read from and written to streams. 
> 
>-Neal 
> 

Make sure the allocation routine is not reserving the memory for future use.
Many allocation schemes do this to improve performance. The functions
coreleft and farcoreleft, will not report this saved memory, you need to
use the heap functions to find this saved memory. I've never done this
myself, but I have seen some code to do this.

Another consideration:
Is the instantiation (sp?) of your TResourceFile class the very first
instantiation (there's that word again). If it is, your memory loss may
be from the stream manager's initialization of your streamable class.
I do not think the ste stream manager releases this memory, in case it
might be needed later on.

Well, a few thought to look at (how do you see thoughts!).

Harry E. Miller ----------------- just a jerk lurking on the net
hmiller@osiris.cso.uiuc.edu ----- where to send the hate mail
Technical Details
Message-ID: <C0pBuv.DJv@news.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!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
References: <726291562.0@ttlg.ttlg.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!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
From: hmiller@osiris.cso.uiuc.edu (Harry Miller)
Subject: Re: BC++ TV Stream Manager..
References: <726291562.0@ttlg.ttlg.UUCP>
Message-ID: <C0pBuv.DJv@news.cso.uiuc.edu>
Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
Organization: University of Illinois at Urbana
Date: Mon, 11 Jan 1993 18:11:18 GMT
Lines: 35