libharbour.dll virtual machine activity on dbwin32

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

libharbour.dll virtual machine activity on dbwin32

Postby Antonio Linares » Sat Oct 23, 2021 2:33 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: libharbour.dll virtual machine activity on dbwin32

Postby Carles » Sun Oct 24, 2021 4:39 pm

Mr. Linares,

Incredible the calls that are made to hb_xbfree.

C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1126
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: libharbour.dll virtual machine activity on dbwin32

Postby Otto » Sun Oct 24, 2021 4:46 pm

Dear Antonio,
Can you please explain what these tests are about?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6301
Joined: Fri Oct 07, 2005 7:07 pm

Re: libharbour.dll virtual machine activity on dbwin32

Postby Antonio Linares » Mon Oct 25, 2021 8:57 am

Dear Otto,

we have found that building Harbour with these flags:

set HB_USER_CFLAGS=-DHB_FM_STATISTICS_OFF -DHB_FM_WIN_ALLOC

the resulting libharbour.dll manages memory much better, as we use the standard Windows API LocalAlloc(), LocalRealloc(), LocalFree(), etc to manage the memory on Windows

Also, modifying mod_harbour's entry.c this way (two calls to OutputDebugString()) makes memory liberation work much better:
Code: Select all  Expand view
#include <Windows.h>
#include <hbapi.h>
#include <hbvm.h>

static void * pRequestRec;

HB_EXPORT_ATTR int hb_apache( void * _pRequestRec )
{
   int iResult;

   pRequestRec = _pRequestRec;
 
   hb_vmInit( HB_TRUE );
   OutputDebugString( "after hb_vmInit()\n" );
   iResult = hb_vmQuit();
   OutputDebugString( "after hb_vmQuit()\n" );
   return iResult;
}  

void * GetRequestRec( void )
{
   return pRequestRec;
}

HB_FUNC( AP_ENTRY )
{
   hb_apache( NULL );
}  
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 1 guest