FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour _xvalloc _xvfree _xvlock _xvunlock
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Fri Jan 06, 2006 12:53 PM

Hello!

Which functions should I use instead of
_xvalloc, _xvfree, _xvlock and _xvunlock?

http://clipper.ecofor.cl/C52G03B/ng1763f.html

Looking at hbapi.ch, I see that there exist
hb_xalloc and hb_xfree. Is it safe to use
them without locking?

Is there any difference between fixed
and virtual memory in Harbour:

http://clipper.ecofor.cl/C52G03B/ng16770.html

Thanks, Roman

© I'm not patented!
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Fri Jan 06, 2006 09:06 PM

Roman,

You just need to use:

hb_xgrab( ULONG ulSize ) --> void * pMem

and

hb_xfree( void * pMem ) --> void

In 32 bits there is no need to lock the memory at all.

If you are going to store a Harbour item into it, then you should call hb_gcGripGet( PHB_ITEM ) and hb_gcGripDrop( PHB_ITEM ) to avoid the garbage collector to destroy that item.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Sat Jan 07, 2006 02:00 AM

Thanks!

BTW, where can I download Harbour source?
Link to ftp://ftp.harbour-project.org/source/ha ... 45.src.zip
does not work...

Roman

© I'm not patented!
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Sat Jan 07, 2006 07:17 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Sat Jan 07, 2006 10:00 AM

Thanks!

FYI, I was trying to download file

ftp://ftp.harbour-project.org/source/ha ... 45.src.zip
with Opera and Internet Explorer 6, but no success (timeout)

Eventually, I downloaded it with "FAR Manager":

http://farmanager.com/download.php?l=en

http://farmanager.com/updates.php?l=en

BTW, there are no file packages on

http://sourceforge.net/projects/harbour-project

Regards, Roman

© I'm not patented!
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Sat Jan 07, 2006 01:58 PM

Roman,

> BTW, there are no file packages on
> http://sourceforge.net/projects/harbour-project

Go to the CVS source repository.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 207
Joined: Fri Oct 07, 2005 07:58 AM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Tue Jan 24, 2006 10:42 AM
Hello!

Go to the CVS source repository.


Oh, I see!
http://cvs.sourceforge.net/viewcvs.py/h ... t/harbour/

BTW, I've found two small bugs in alert & achoice so I've
subscribed to the harbour mailing list
http://lists.harbour-project.org/piperm ... 01075.html
and posted corrections to the list. I hope that
someone will incorporate them into CVS.

Regards, Roman
© I'm not patented!
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
_xvalloc _xvfree _xvlock _xvunlock
Posted: Tue Jan 24, 2006 02:52 PM

Roman,

Yes, surely someone will include your fixes in the CVS files. Thanks!

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion