From 31431d99ab5a655837445adf2fc2339d25a1ab98 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 12 Aug 2019 14:24:01 +0000 Subject: [PATCH] * limit the heapsize to 65520 bytes on win16 (the $M directive in win16 only sets the size of the "local heap", which is limited to a single segment. The actual heap in the large memory model is the "global heap", which doesn't have a set limit, but grows with the memory allocated) git-svn-id: trunk@42660 - --- compiler/scandir.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/scandir.pas b/compiler/scandir.pas index 1b5ff29e5e..ef6c1c343f 100644 --- a/compiler/scandir.pas +++ b/compiler/scandir.pas @@ -855,7 +855,12 @@ unit scandir; maxheapsize_limit: longint; begin {$if defined(i8086)} - if current_settings.x86memorymodel in x86_far_data_models then + if target_info.system=system_i8086_win16 then + begin + heapsize_limit:=65520; + maxheapsize_limit:=65520; + end + else if current_settings.x86memorymodel in x86_far_data_models then begin heapsize_limit:=655360; maxheapsize_limit:=655360;