mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 16:39:24 +01: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