blob: 5ed91c3cf8056e6511c72574039427d6c6405250 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{*****************************************************************************
OS Memory allocation / deallocation
****************************************************************************}
function ___sbrk(size:longint):pointer;cdecl; external name '___sbrk';
function SysOSAlloc(size: ptrint): pointer;assembler;
asm
{$ifdef SYSTEMDEBUG}
cmpb $1,accept_sbrk
je .Lsbrk
movl $0,%eax
jmp .Lsbrk_fail
.Lsbrk:
{$endif}
movl size,%eax
pushl %eax
call ___sbrk
addl $4,%esp
{$ifdef SYSTEMDEBUG}
.Lsbrk_fail:
{$endif}
end;
{ define HAS_SYSOSFREE}
procedure SysOSFree(p: pointer; size: ptrint);
begin
end;
|