---- Le Wed, 19 Feb 2025 18:11:19 -0500 Bernd Böckmann via Freedos-devel a écrit ----
> Hello Jeremy, > > On 20.02.2025 00:03, perditi...@gmail.com wrote: > > > Thanks for looking into it. I will have a look at Watcom build and > > see why it's not patching header. > > Have a look at > > https://github.com/FDOS/freecom/blob/fa674ea7b5aa4fcb0e4b4263d9ba31d79ccfc961/tools/ptchsize.c#L276 > > ;) > > While the source comment "Watcom already has extraMin minimal and > dynamically adjusts its MCB" seems to be valid, it partially misses the > point in that adjusting extraMin may prevent DOS from loading FreeCOM > into a memory area which is too small to guarantee it gets enough heap. > > Bernd So I intend to test what happens when removing the #if def, from a clean version of main branch of FreeCOM. Freshly redownloaded main branch, give me a FreeCOM\command.com with 117h at offset A. That give me the out of memory error. C:\Users\Paul\freecom\freecom4>type 0001-patch-for-all-compilers-avoiding-out-of-memory-error.patch From 9b4e0fa43cb1c649ccd3f5ed23cef46278148c65 Mon Sep 17 00:00:00 2001 From: Paul Dufresne <dufres...@zoho.com> Date: Fri, 21 Feb 2025 04:01:04 -0500 Subject: [PATCH] patch for all compilers, avoiding out of memory error when Watcom --- tools/ptchsize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ptchsize.c b/tools/ptchsize.c index 9209d99..14e56cd 100644 --- a/tools/ptchsize.c +++ b/tools/ptchsize.c @@ -273,7 +273,7 @@ int main(int argc, char **argv) printf("Patching '%s' to heap size of %u bytes\n" , argv[1], tosize); -#if defined(__TURBOC__) || defined(GCC) + /* Watcom already has extraMin minimal and dynamically adjusts its MCB*/ if(tosize) { #ifdef GCC @@ -293,7 +293,6 @@ int main(int argc, char **argv) "File most probably corrupted now: %s\n", argv[1]); return 77; } -#endif #ifndef GCC if(fseek(freecom, ival.heapPos, SEEK_SET) != 0) { -- 2.48.1.windows.1 Now FreeCOM/command offset A have 317h. And it now boots without errors. _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel