_xvalloc _xvfree _xvlock _xvunlock

Post Reply
User avatar
modicr
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia
Contact:

_xvalloc _xvfree _xvlock _xvunlock

Post by modicr »

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!
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
modicr
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia
Contact:

Post by modicr »

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!
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
modicr
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia
Contact:

Post by modicr »

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!
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
modicr
Posts: 207
Joined: Fri Oct 07, 2005 7:58 am
Location: ljubljana, barje, slovenia
Contact:

Post by modicr »

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!
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roman,

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

Antonio Linares
www.fivetechsoft.com
Post Reply