mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 03:30:00 +02:00
* *memORY overloads
This commit is contained in:
parent
de98fa5cb5
commit
fcde2c3ffa
@ -205,6 +205,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure GetMemory(Var p:pointer;Size:Longint);
|
||||||
|
begin
|
||||||
|
GetMem(p,size);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure FreeMem(p:pointer;Size:Longint);
|
procedure FreeMem(p:pointer;Size:Longint);
|
||||||
begin
|
begin
|
||||||
@ -223,6 +227,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure FreeMemory(p:pointer;Size:Longint);
|
||||||
|
begin
|
||||||
|
FreeMem(p,size);
|
||||||
|
end;
|
||||||
|
|
||||||
function MaxAvail:Longint;
|
function MaxAvail:Longint;
|
||||||
begin
|
begin
|
||||||
@ -315,6 +323,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function FreeMemory(p:pointer):Longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
FreeMemory:=FreeMem(p);
|
||||||
|
end;
|
||||||
|
|
||||||
function GetMem(size:longint):pointer;
|
function GetMem(size:longint):pointer;
|
||||||
begin
|
begin
|
||||||
@ -333,6 +346,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function GetMemory(size:longint):pointer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
GetMemory:=Getmem(size);
|
||||||
|
end;
|
||||||
|
|
||||||
function AllocMem(Size:Longint):pointer;
|
function AllocMem(Size:Longint):pointer;
|
||||||
begin
|
begin
|
||||||
@ -370,6 +388,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function ReAllocMemory(var p:pointer;Size:Longint):pointer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
ReAllocMemory:=ReAllocMem(p,size);
|
||||||
|
end;
|
||||||
|
|
||||||
{$ifdef ValueGetmem}
|
{$ifdef ValueGetmem}
|
||||||
|
|
||||||
{ Needed for calls from Assembler }
|
{ Needed for calls from Assembler }
|
||||||
@ -1265,7 +1289,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.23 2003-09-28 12:43:48 peter
|
Revision 1.24 2003-10-02 14:03:24 marco
|
||||||
|
* *memORY overloads
|
||||||
|
|
||||||
|
Revision 1.23 2003/09/28 12:43:48 peter
|
||||||
* fixed wrong check when allocation of a block > 1mb failed
|
* fixed wrong check when allocation of a block > 1mb failed
|
||||||
|
|
||||||
Revision 1.22 2003/09/27 11:52:35 peter
|
Revision 1.22 2003/09/27 11:52:35 peter
|
||||||
|
@ -62,7 +62,9 @@ Function Sysheapsize:longint;
|
|||||||
|
|
||||||
{ Tp7 functions }
|
{ Tp7 functions }
|
||||||
Procedure Getmem(Var p:pointer;Size:Longint);
|
Procedure Getmem(Var p:pointer;Size:Longint);
|
||||||
|
Procedure Getmemory(Var p:pointer;Size:Longint);
|
||||||
Procedure Freemem(p:pointer;Size:Longint);
|
Procedure Freemem(p:pointer;Size:Longint);
|
||||||
|
Procedure Freememory(p:pointer;Size:Longint);
|
||||||
Function memavail:Longint;
|
Function memavail:Longint;
|
||||||
Function maxavail:Longint;
|
Function maxavail:Longint;
|
||||||
|
|
||||||
@ -72,9 +74,12 @@ Function heapsize:longint;
|
|||||||
|
|
||||||
{ Delphi functions }
|
{ Delphi functions }
|
||||||
function GetMem(size:longint):pointer;
|
function GetMem(size:longint):pointer;
|
||||||
|
function GetMemory(size:longint):pointer;
|
||||||
function Freemem(p:pointer):longint;
|
function Freemem(p:pointer):longint;
|
||||||
|
function Freememory(p:pointer):longint;
|
||||||
function AllocMem(Size:Longint):pointer;
|
function AllocMem(Size:Longint):pointer;
|
||||||
function ReAllocMem(var p:pointer;Size:Longint):pointer;
|
function ReAllocMem(var p:pointer;Size:Longint):pointer;
|
||||||
|
function ReAllocMemory(var p:pointer;Size:Longint):pointer;
|
||||||
|
|
||||||
{ Do nothing functions, are only here for tp7 compat }
|
{ Do nothing functions, are only here for tp7 compat }
|
||||||
Procedure mark(var p : pointer);
|
Procedure mark(var p : pointer);
|
||||||
@ -90,7 +95,10 @@ Procedure AsmFreemem(var p:pointer);
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 2002-10-30 20:39:13 peter
|
Revision 1.7 2003-10-02 14:03:24 marco
|
||||||
|
* *memORY overloads
|
||||||
|
|
||||||
|
Revision 1.6 2002/10/30 20:39:13 peter
|
||||||
* MemoryManager record has a field NeedLock if the wrapper functions
|
* MemoryManager record has a field NeedLock if the wrapper functions
|
||||||
need to provide locking for multithreaded programs
|
need to provide locking for multithreaded programs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user