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

2009-04-26 Thread Marco van de Voort
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 >

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

2009-04-26 Thread Guillermo Martínez Jiménez
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

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

2009-04-26 Thread Guillermo Martínez Jiménez
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