On Wed, 29 Nov 2006, Andrew Brunner wrote:

> Ok, but ZeroMemory is as Windows API call.  I'm trying to upgrade my source
> to make sure it will compile under OSX and Linux.  
> 
> Are you saying that FPC converts the functions in the Windows unit to work
> on all supported platforms?

No. 

FillChar or FillWord are implementations which have no connection
with ZeroMemory whatsoever, other than that they just happen to do the same
thing. Only FillChar or FillWord are platform and processor independent.

These functions existed even before the Windows unit existed.
(probably even before Windows existed, because they stem from 
Turbo Pascal...)

Michael.

> 
> 
> Thanks
>  
> -----Original Message-----
> From: Michael Van Canneyt [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 29, 2006 11:02 AM
> To: [email protected]
> Subject: Re: [lazarus] ZeroMemory Functionality
> 
> 
> 
> On Wed, 29 Nov 2006, Andrew Brunner wrote:
> 
> > I am looking for a way to zero a block of memory I allocated.  I don't
> > really want to use FillChar with #0.   
> 
> What do you think zeromemory does ? It's the same thing.
> 
> AFAIK FillChar is optimized for each processor. 
> If it's large amounts of memory, use FillWord.
> 
> Michael.
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to