* fpc_freemem and fpc_getmem compilerproc

This commit is contained in:
peter 2002-04-21 18:56:59 +00:00
parent 4efea524e8
commit 90ff7a6db8
3 changed files with 25 additions and 13 deletions

View File

@ -428,7 +428,7 @@ asm
{ Memory size }
pushl (%eax)
{$ifdef valuegetmem}
call AsmGetMem
call fpc_getmem
movl %eax,(%esi)
{$else valuegetmem}
pushl %esi
@ -513,7 +513,7 @@ asm
{ push object position }
{$ifdef valuefreemem}
pushl %esi
call AsmFreeMem
call fpc_freemem
{$else valuefreemem}
leal 12(%ebp),%eax
pushl %eax
@ -552,7 +552,7 @@ asm
{$ifdef valuefreemem}
{ Freemem }
pushl %eax
call AsmFreeMem
call fpc_freemem
{$else valuefreemem}
{ temporary Variable }
subl $4,%esp
@ -1170,7 +1170,10 @@ procedure inclocked(var l : longint);assembler;
{
$Log$
Revision 1.21 2002-04-01 14:23:17 carl
Revision 1.22 2002-04-21 18:56:59 peter
* fpc_freemem and fpc_getmem compilerproc
Revision 1.21 2002/04/01 14:23:17 carl
- no need for runerror 203, already fixed!
Revision 1.20 2002/03/30 14:52:04 carl

View File

@ -32,10 +32,10 @@ type
{ Needed to solve overloading problem with call from assembler (PFV) }
{$ifdef valuegetmem}
Function AsmGetmem(size:Longint):pointer;compilerproc;
Function fpc_getmem(size:Longint):pointer;compilerproc;
{$endif}
{$ifdef valuefreemem}
Procedure AsmFreemem(p:pointer);compilerproc;
Procedure fpc_freemem(p:pointer);compilerproc;
{$endif valuefreemem}
procedure fpc_Shortstr_SetLength(var s:shortstring;len:StrLenInt); compilerproc;
@ -256,7 +256,10 @@ Procedure fpc_typed_read(TypeSize : Longint;var f : TypedFile;var Buf); compiler
{
$Log$
Revision 1.13 2002-01-21 20:16:08 peter
Revision 1.14 2002-04-21 18:56:59 peter
* fpc_freemem and fpc_getmem compilerproc
Revision 1.13 2002/01/21 20:16:08 peter
* updated for dynarr:=nil
Revision 1.12 2001/12/03 21:39:20 peter

View File

@ -378,14 +378,14 @@ end;
{$ifdef ValueGetmem}
{ Needed for calls from Assembler }
function AsmGetMem(size:longint):pointer;compilerproc;[public,alias:'FPC_GETMEM'];
function fpc_getmem(size:longint):pointer;compilerproc;[public,alias:'FPC_GETMEM'];
begin
{$ifdef MT}
if IsMultiThread then
begin
try
EnterCriticalSection(cs_systemheap);
AsmGetMem:=MemoryManager.GetMem(size);
fpc_GetMem:=MemoryManager.GetMem(size);
finally
LeaveCriticalSection(cs_systemheap);
end;
@ -393,7 +393,7 @@ begin
else
{$endif MT}
begin
AsmGetMem:=MemoryManager.GetMem(size);
fpc_GetMem:=MemoryManager.GetMem(size);
end;
end;
@ -409,7 +409,7 @@ end;
{$ifdef ValueFreemem}
procedure AsmFreeMem(p:pointer);compilerproc;[public,alias:'FPC_FREEMEM'];
procedure fpc_freemem(p:pointer);compilerproc;[public,alias:'FPC_FREEMEM'];
begin
{$ifdef MT}
if IsMultiThread then
@ -1106,7 +1106,10 @@ begin
if size=0 then
begin
if p<>nil then
MemoryManager.FreeMem(p);
begin
MemoryManager.FreeMem(p);
p:=nil;
end;
end
else
{ Allocate a new block? }
@ -1256,7 +1259,10 @@ end;
{
$Log$
Revision 1.12 2002-02-10 15:33:45 carl
Revision 1.13 2002-04-21 18:56:59 peter
* fpc_freemem and fpc_getmem compilerproc
Revision 1.12 2002/02/10 15:33:45 carl
* fixed some missing IsMultiThreaded variables
Revision 1.11 2002/01/02 13:43:09 jonas