diff --git a/components/codetools/memcheck.pas b/components/codetools/memcheck.pas index 46ea70c78a..ddf779c8cf 100644 --- a/components/codetools/memcheck.pas +++ b/components/codetools/memcheck.pas @@ -12,7 +12,7 @@ interface check by CRC value if not changed after release WARNING this needs extremely much memory (PM) } -{ $DEFINE Extra} +{$DEFINE Extra} {$inline off}// inline off for stack traces @@ -362,11 +362,13 @@ begin is_in_getmem_list:=true; pp:=pp^.previous; inc(i); - if i>loc_info^.getmem_cnt-loc_info^.freemem_cnt then + if i>loc_info^.getmem_cnt-loc_info^.freemem_cnt then begin if useownfile then writeln(ownfile,'error in linked list of heap_mem_info') else writeln(stderr,'error in linked list of heap_mem_info'); + RunError(204); + end; end; end; diff --git a/ide/lazarus.pp b/ide/lazarus.pp index 8fd987550f..0b9e2ba9b5 100644 --- a/ide/lazarus.pp +++ b/ide/lazarus.pp @@ -40,7 +40,7 @@ program Lazarus; {$R lazarus.rc} {$ENDIF} -{off $DEFINE IDE_MEM_CHECK} +{$DEFINE IDE_MEM_CHECK} uses //cmem,