Miguel,

It is correct to reset s_ulAllocated to 0 when collection is  
executed, because it's used as a flag to avoid redundant collections  
when not many allocations were performed since last collection. Yo  
can just add protection to the --s_ulAllocated to avoid negating a 0.  
You can also add additional counter that is NOT being reset, if you  
want count of total allocated items.

Ron

On Apr 24, 2008, at 9:10 AM, Miguel Angel Marchuet wrote:

> I created this function at garbage.c to know the ITEMS at GB
>
> HB_FUNC( HB_GCALLOCATED )
> {
>     HB_THREAD_STUB
>     hb_retnl( s_uAllocated );
> }
>
> but it don't works correctly because function
>
> HB_EXPORT void hb_gcCollectAll( BOOL bForce )
>
>
> put this value to 0
>
> I think that it's incorrect the line 633
>
>     s_uAllocated = 0;
>
>
> because it makes this value negative in some cases ;)
>
>
> Any body is agree ?
>
>
> Best regards,
> Miguel Angel Marchuet
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http:// 
> java.sun.com/javaone
> _______________________________________________
> xHarbour-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to