Hi All,

>> It's possible. Replacing default malloc()/free() functions have to be 
>> global. Some compilers may keep some hardcoded references to default memory 
>> manager and in such case they will crash when memory pointers from two 
>> different memory manager are mixed.
>> In this case with HBQT you are introducing C++ RTL which may use it's own 
>> references to build in memory manager. It's possible that adding this code 
>> to one of HBQT CPP files will resolve the problem:
> 
>>  void * operator new( size_t nSize ) { return hb_xgrab( nSize ); }
>>  void operator delete( void * p ) { hb_xfree( p ); }

Here's QT docs about this topic:
   
http://doc.trolltech.com/4.5/qt-performance.html#alternative-memory-allocation

We already have part of this enabled in fm.c, but only 
when building core in C++ mode, and if FMSTAT is enabled.

Maybe we should create a small contrib lib with just 
that, so that it could be used by any C++ contribs we 
may happen to have in the future (plus hbqt of course).

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to