summaryrefslogtreecommitdiff
path: root/rtl/os2/sysheap.inc
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:28:34 +0000
commit1903b037de2fb3e75826406b46f055acb70963fa (patch)
tree604cd8b790fe14e5fbe441d4cd647c80d2a36a9a /rtl/os2/sysheap.inc
parentad1141d52f8353457053b925cd674fe1d5c4eafc (diff)
parent953d907e4d6c3a5c2f8aaee6e5e4f73c55ce5985 (diff)
downloadfpc-blocks.tar.gz
* synchronised with trunk till r29513blocks
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29516 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/os2/sysheap.inc')
-rw-r--r--rtl/os2/sysheap.inc17
1 files changed, 7 insertions, 10 deletions
diff --git a/rtl/os2/sysheap.inc b/rtl/os2/sysheap.inc
index f5147bcc13..c163523fc1 100644
--- a/rtl/os2/sysheap.inc
+++ b/rtl/os2/sysheap.inc
@@ -1,10 +1,8 @@
{
This file is part of the Free Pascal run time library.
- Copyright (c) 2001 by Free Pascal development team
+ Copyright (c) 2001-2014 by Free Pascal development team
- This file implements all the base types and limits required
- for a minimal POSIX compliant subset required to port the compiler
- to a new OS.
+ This file implements heap management for OS/2.
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
@@ -87,6 +85,7 @@ begin
else
begin
SysOSAlloc := nil;
+ OSErrorWatch (RC);
{$IFDEF EXTDUMPGROW}
if Int_HeapSize <> high (cardinal) then
begin
@@ -104,25 +103,23 @@ end;
{$define HAS_SYSOSFREE}
procedure SysOSFree (P: pointer; Size: ptruint);
-{$IFDEF EXTDUMPGROW}
var
RC: cardinal;
-{$ENDIF EXTDUMPGROW}
begin
{$IFDEF EXTDUMPGROW}
WriteLn ('Trying to free memory!');
WriteLn ('Total allocated memory is ', Int_HeapSize);
Dec (Int_HeapSize, Size);
- RC :=
{$ENDIF EXTDUMPGROW}
- DosFreeMem (P);
-{$IFDEF EXTDUMPGROW}
+ RC := DosFreeMem (P);
if RC <> 0 then
begin
+ OSErrorWatch (RC);
+{$IFDEF EXTDUMPGROW}
WriteLn ('Error ', RC, ' during memory deallocation (DosFreeMem)!');
WriteLn ('Total allocated memory is ', Int_HeapSize);
- end;
{$ENDIF EXTDUMPGROW}
+ end;
end;