On Mon, 23 Feb 2009, toni...@fwi wrote:

Hi,

> >So please check what happens when you compile Harbour using
> >-DHB_FM_WIN_ALLOC
> I´m using native BCC 6.10 MM and the same problem exist. I can see
> that in BCC I have less unfreed resources, but it exist.

So it's not DLMALLOC only problem but also BCC one or some other
3-rd party tool which allocates the memory not using hb_xgrab()/hb_xfree()
and this memory is not freed.
In such case we rather cannot help though it's possible that it's unexpected
result of some system call, f.e. SetUnhandledExceptionFilter(). But in such
case it's the question to windows developers to isolate the exact reason
of problem. Sorry but I do not have enough knowledge about MS-Windows
internals to help directly.
I suggest to rebuild Harbour with -DHB_FM_WIN_ALLOC.
Then make pure console test application:

   ANNOUNCE HB_GT_SYS
   REQUEST HB_GT_NUL_DEFAULT
   proc main()
   return

And check if the problem still exists. If yes then you can try to create
simple C code to check if CRTL can be closed cleanly, f.e.:

   #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;
   }

If it releases cleanly all virtual memory handles then you can try to
disable some system calls in HVM startup code to locate the one which
causes the problem, f.e. you can start with commenting call to
SetUnhandledExceptionFilter().
If you will find the reason then we can decide we should ignore it or
pacify.

BTW Pritpal, can you make some tests with BCC55 and confirm the results
with -DHB_FM_WIN_ALLOC are the same?

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to