Date: Wed, 17 Aug 94 19:11:29 +0100 From: buers AT dg1 DOT chemie DOT uni-konstanz DOT de (Dieter Buerssner) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: bug in paging.c While trying the new release of djgpp (1.12), I found that the compiler paged very much. Enabling toplineinfo I found that free memory (VCPI) was about 2100 kB when gcc is loaded and only 300 kB when cc1 is loaded from gcc. (32 bit version of gcc). I 'stubedited' the keepmem of gcc (and make) to 0, and the problem seemed to go away. But in different situations the same problem appeared again. For the second problem I found the solution in paging.c, where the used memory is calculated in 16 bit arithmetic. The first problem doesn't seem to dissappear. Even when the keepmem is on 1 Mb I think the chield process should have much more free memory with my setup than 300 kB. Dieter *** paging.oc Wed Aug 17 18:57:56 1994 --- paging.c Wed Aug 17 18:57:12 1994 *************** *** 1098,1104 **** fInPageOutEverything = 1; ! kept_on_exec = (valloc_used()*4096 <= stub_info.max_keep_on_spawn); if (!kept_on_exec) while (page_out(-1) != 0xffff) vfree(); --- 1098,1104 ---- fInPageOutEverything = 1; ! kept_on_exec = (valloc_used()*4096L <= stub_info.max_keep_on_spawn); if (!kept_on_exec) while (page_out(-1) != 0xffff) vfree();