mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 18:39:35 +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;
|
||||
|
||||
const
|
||||
sysTrapMemChunkFree = $A012;
|
||||
sysTrapMemPtrNew = $A013;
|
||||
|
||||
function MemPtrNew(size: UInt32): MemPtr; syscall sysTrapMemPtrNew;
|
||||
function MemPtrFree(chunkDataP: MemPtr): Err; syscall sysTrapMemChunkFree;
|
||||
|
||||
{$PACKRECORDS DEFAULT}
|
||||
|
@ -20,10 +20,13 @@
|
||||
|
||||
function SysOSAlloc(size: ptruint): pointer;
|
||||
begin
|
||||
SysOSAlloc:=MemPtrNew(size);
|
||||
end;
|
||||
|
||||
{$define HAS_SYSOSFREE}
|
||||
|
||||
procedure SysOSFree(p: pointer; size: ptruint);
|
||||
begin
|
||||
if (p <> nil) then
|
||||
MemPtrFree(p);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user