On Tue, 02 Feb 2010, April White wrote:
Hi,
> Thank you Przemek. I've tried your suggestion but my implementation
> does not work as expected, the stats output is:
> fm.c:1134: HB_TR_ERROR Block 1 (size 40) HB_BTREEINSERT(0),
> "F8A454004001550058D
> C4B00010001001000000000000000000000000000F03F0A00020000000000"
> But I know the memory allocation is in a sub-function.
You haven't set DEBUG tracing level. You can do that setting
HB_TR_LEVEL envvar, i.e.:
export HB_TR_LEVEL=HB_TR_DEBUG
or in DOS/Windows:
set HB_TR_LEVEL=HB_TR_DEBUG
Just try.
I'll commit in a while modifications which allow to eliminate
setting HB_TR_LEVEL using HB_TR_FM message level.
You will have to modify your code to:
void * hb_xgrab_fm( void *buffer, ULONG ulSize,
const char * szFile, int iLine )
{
hb_traceset( HB_TR_FM, szFile, iLine, NULL );
return hb_xrealloc( buffer, ulSize );
}
You can use hb_xrealloc( NULL, ulSize ) to allocate memory so you do not
need additional condition in hb_xgrab_fm() function.
best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour