浏览代码

+ added some morphos support to checkpointer

git-svn-id: trunk@4122 -
Károly Balogh 19 年之前
父节点
当前提交
8311d34b3f
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      rtl/inc/heaptrc.pp

+ 12 - 0
rtl/inc/heaptrc.pp

@@ -790,6 +790,9 @@ var
   get_ebp,stack_top : longword;
   data_end : longword;
 {$endif go32v2}
+{$ifdef morphos}
+  stack_top: longword;
+{$endif morphos}
   ptext : ^text;
 label
   _exit;
@@ -857,6 +860,15 @@ begin
     goto _exit;
 {$endif linux}
 
+{$ifdef morphos}
+  { inside stack ? }
+  stack_top:=ptruint(StackBottom)+StackLength;
+  if (ptruint(p)<stack_top) and (ptruint(p)>ptruint(StackBottom)) then
+    goto _exit;
+  { inside data or bss ? }
+  {$WARNING data and bss checking missing }
+{$endif morphos}
+
   { first try valid list faster }
 
 {$ifdef EXTRA}