mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:46:11 +02:00
palmos: implemented sysosalloc/free for the heap
git-svn-id: trunk@37248 -
This commit is contained in:
parent
e896c16b4f
commit
790c1f87f1
@ -65,4 +65,11 @@ const
|
|||||||
|
|
||||||
procedure SndPlaySystemSound(beepID: Word); syscall sysTrapSndPlaySystemSound;
|
procedure SndPlaySystemSound(beepID: Word); syscall sysTrapSndPlaySystemSound;
|
||||||
|
|
||||||
|
const
|
||||||
|
sysTrapMemChunkFree = $A012;
|
||||||
|
sysTrapMemPtrNew = $A013;
|
||||||
|
|
||||||
|
function MemPtrNew(size: UInt32): MemPtr; syscall sysTrapMemPtrNew;
|
||||||
|
function MemPtrFree(chunkDataP: MemPtr): Err; syscall sysTrapMemChunkFree;
|
||||||
|
|
||||||
{$PACKRECORDS DEFAULT}
|
{$PACKRECORDS DEFAULT}
|
||||||
|
@ -20,10 +20,13 @@
|
|||||||
|
|
||||||
function SysOSAlloc(size: ptruint): pointer;
|
function SysOSAlloc(size: ptruint): pointer;
|
||||||
begin
|
begin
|
||||||
|
SysOSAlloc:=MemPtrNew(size);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$define HAS_SYSOSFREE}
|
{$define HAS_SYSOSFREE}
|
||||||
|
|
||||||
procedure SysOSFree(p: pointer; size: ptruint);
|
procedure SysOSFree(p: pointer; size: ptruint);
|
||||||
begin
|
begin
|
||||||
|
if (p <> nil) then
|
||||||
|
MemPtrFree(p);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user