[fpc-pascal] RE: Getmem -> Move -> Freemem

Guillermo Martínez Jiménez gmjimen at burdjia.com
Sun Apr 26 23:15:25 CEST 2009

> Both are .dat and fdata are points. IOW you are moving "fsize" bytes from
> the place where the 4 byte of the pointer dat is stored to the place where
> the 4 bytes of the pointer fdata is stored. Since you probably move more
> than 4 bytes you totally corrupt what is behind "fdata" in memory.
> Try  .dat^ and fdata^ in the move line.

Thanks.  That fixes it partially.

Now it fails trying to copy 998846 bytes. If I put an "IF fSize <
900000 THEN..." to prevent move more than 900000 bytes it does work
and I'm sure it moves up to 206737 bytes. But "size" is LONGINT so
IIRC it should be able to copy ~2Gib of data.

Does it have a size limit? If so,  is there a way to copy all that
data  without doing it byte-by-byte?

Guillermo "Ñuño" Martínez

More information about the fpc-pascal mailing list