On 26 Apr 2009, at 23:15, Guillermo Martínez Jiménez wrote:
Now it fails trying to copy 998846 bytes. If I put an "IF fSize <
90 THEN..." to prevent move more than 90 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 ~2G
> 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.
>
> From: Graeme Geldenhuys
> Subject: Re: [fpc-pascal] How to use fpcmake
>
> Hi Guillermo,
>
> I struggled with it as well. Henry Vermaak then created an example for
> me and showed how to use it. The example he did was for the fpGUI
> Toolkit project.
I did read Vermaak's example and I've found
In our previous episode, Guillermo Mart?nez Jim?nez said:
> fSize := aObject^.size;
> GetMem (fData, fSize);
> Move (aObject^.dat, fData, fSize);
>
> Both "fData" and "dat" are untyped POINTER but the program returns an
> "Segment violation" at the Move procedure. I've checked the pointers
>
Hello.
I'm using FPC 2.2.2 on Xubuntu 8.10.
I need to reserve dynamic memory to store raw binary data. I tried the
next code:
fSize := aObject^.size;
GetMem (fData, fSize);
Move (aObject^.dat, fData, fSize);
Both "fData" and "dat" are untyped POINTER but the program returns an
"Segment vi
Hello.
I'm using
I need to reserve dynamic memory to store raw binary data. I tried the
next code:
fSize := aObject^.size;
GetMem (fData, fSize);
Move (aObject^.dat, fData, fSize);
Both "fData" and "dat" are untyped POINTER but the program returns an
"Segment violation" at the Move procedu