mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 15:09:14 +02:00
* fixes cmem.malloc et al. for windows as proposed by Ludo Brands, resolves #15571
git-svn-id: trunk@18256 -
This commit is contained in:
parent
859757003f
commit
41f25c2b21
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -11515,6 +11515,7 @@ tests/webtbs/tw15467.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw15500.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15504.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15530.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw15571.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw15591.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw15592.pp svneol=native#text/plain
|
||||
tests/webtbs/tw15599.pp svneol=native#text/plain
|
||||
|
@ -48,10 +48,10 @@ Procedure free (P : pointer); cdecl; external;
|
||||
function realloc (P : Pointer; Size : ptruint) : pointer;cdecl; external;
|
||||
Function calloc (unitSize,UnitCount : ptruint) : pointer;cdecl; external;
|
||||
{$else not USE_STATIC_LIBC}
|
||||
Function Malloc (Size : ptruint) : Pointer; {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'malloc';
|
||||
Procedure Free (P : pointer); {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'free';
|
||||
function ReAlloc (P : Pointer; Size : ptruint) : pointer; {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'realloc';
|
||||
Function CAlloc (unitSize,UnitCount : ptruint) : pointer; {$ifdef win32}stdcall{$else}cdecl{$endif}; external LibName name 'calloc';
|
||||
Function Malloc (Size : ptruint) : Pointer; cdecl; external LibName name 'malloc';
|
||||
Procedure Free (P : pointer); cdecl; external LibName name 'free';
|
||||
function ReAlloc (P : Pointer; Size : ptruint) : pointer; cdecl; external LibName name 'realloc';
|
||||
Function CAlloc (unitSize,UnitCount : ptruint) : pointer; cdecl; external LibName name 'calloc';
|
||||
{$endif not USE_STATIC_LIBC}
|
||||
|
||||
implementation
|
||||
|
5
tests/webtbs/tw15571.pp
Normal file
5
tests/webtbs/tw15571.pp
Normal file
@ -0,0 +1,5 @@
|
||||
uses cmem, sysutils;
|
||||
begin
|
||||
inttostr(1234);
|
||||
malloc(1000); //crashes here
|
||||
end.
|
Loading…
Reference in New Issue
Block a user