On Wed, 25 Feb 2009, Andi Jahja wrote:
> It's Harbour problem, IMHO. Have you try with xHarbour and see how
> memproof reporting errors? In my case, Harbour did not release Virtual
> Memory, but xHarbour released it. So, it is not Borland problem ;-)
Yes and Harbour virtually effects this C code:
#include <stdlib.h>
#include <stdio.h>
int main( int argc, char ** argv )
{
char * buffer = malloc( 1000 );
sprintf( buffer, "number of arguments: %d, argv[0]='%s'\n",
argc, argv[0] );
printf( "%s", buffer );
free( buffer );
return 0;
}
Probably the fact that Harbour files exists on hard disk is
enough to cause that this pure Borland program does not release
virtual memory, isn't it? :-)
xHarbour does not enable DLMALLOC with the same conditions as
Harbour and it's the reason of difference. I guess you are using
__EXPORT__ macro which effectively disables DLMALLOC in xHarbour.
BTW if you can test the above code with BCC6.1 to confirm the results
then it will really help.
best regards,
Przemek
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour