mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 12:00:30 +02:00
* Patch from joost van der sluis not to realloc buffers
This commit is contained in:
parent
06c3cc3bd0
commit
5ab50a2316
@ -41,8 +41,7 @@ end;
|
||||
function TBufDataset.AllocRecordBuffer: PChar;
|
||||
|
||||
begin
|
||||
result := AllocRecord;
|
||||
ReAllocMem(result,RecordSize+sizeof(TBufBookmark));
|
||||
result := AllocRecord(sizeof(TBufBookmark));
|
||||
end;
|
||||
|
||||
procedure TBufDataset.FreeRecordBuffer(var Buffer: PChar);
|
||||
@ -193,7 +192,7 @@ begin
|
||||
ReAllocMem(FBBuffers,FBBuffercount*SizeOf(PChar));
|
||||
|
||||
repeat
|
||||
FBBuffers[FBRecordCount+i] := AllocRecord;
|
||||
FBBuffers[FBRecordCount+i] := AllocRecord(0);
|
||||
b := (getnextrecord(FBBuffers[FBRecordCount+i])<>grOk);
|
||||
inc(i);
|
||||
until (i = FPacketRecords) or b;
|
||||
|
Loading…
Reference in New Issue
Block a user