BlueGrey
calm
Elegant
Català-Valencià – Catalan
中文 – Chinese (Simplified)
中文 – Chinese (Traditional)
Česky – Czech
Dansk – Danish
Nederlands – Dutch
English – English
Suomi – Finnish
Français – French
Deutsch – German
עברית – Hebrew
हिंदी – Hindi
Magyar – Hungarian
Bahasa Indonesia – Indonesian
Italiano – Italian
日本語 – Japanese
한국어 – Korean
Македонски – Macedonian
मराठी – Marathi
Norsk – Norwegian
Polski – Polish
Português – Portuguese
Português – Portuguese (Brazil)
Русский – Russian
Slovenčina – Slovak
Slovenščina – Slovenian
Español – Spanish
Svenska – Swedish
Türkçe – Turkish
Українська – Ukrainian
Oëzbekcha – Uzbek
Subversion Repositories
Kolibri OS
(root)
/
programs
/
develop
/
fp
/
rtl
/
sysheap.inc
@ 6245
– Rev 616
Rev
Blame
|
Last modification
|
View Log
|
Download
|
RSS feed
{
TODO
}
function SysOSAlloc
(
Size
:
PtrInt
)
:
Pointer
;
begin
Result
:
= kos_alloc
(
Size
)
;
end
;
{
$
define HAS_SYSOSFREE
}
procedure SysOSFree
(
P
:
Pointer
; Size: PtrInt);
begin
kos_free
(
P
)
;
end
;
(
*
{
DEBUG version
}
var
SysMemoryBlocks
:
array
[
Byte
]
of record
Used
:
Boolean
;
Address
:
Pointer
;
Size
:
Longint
;
end
;
function SysOSAlloc
(
Size
:
PtrInt
)
:
Pointer
;
var
I
:
Longint
;
begin
Result
:
= kos_alloc
(
Size
)
;
for I
:
=
0
to High
(
SysMemoryBlocks
)
do
if
not
SysMemoryBlocks
[
I
]
.
Used then
begin
SysMemoryBlocks
[
I
]
.
Used
:
= True
;
SysMemoryBlocks
[
I
]
.
Address
:
= Result
;
SysMemoryBlocks
[
I
]
.
Size
:
= Size
;
Break
;
end
;
end
;
{
$
define HAS_SYSOSFREE
}
procedure SysOSFree
(
P
:
Pointer
; Size: PtrInt);
var
B
:
Byte
;
I
:
Longint
;
begin
B
:
=
0
;
for I
:
=
0
to High
(
SysMemoryBlocks
)
do
if SysMemoryBlocks
[
I
]
.
Address = P then
begin
SysMemoryBlocks
[
I
]
.
Used
:
= False
;
if SysMemoryBlocks
[
I
]
.
Size <> Size then B
:
=
1
div
B
;
Break
;
end
;
kos_free
(
P
)
;
end
;*)