Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!aim1!jlr1801 From: jlr1801@aim1.tamu.edu (Jeff Rife) Newsgroups: comp.windows.ms Subject: Re: Message-ID: <12517@helios.TAMU.EDU> Date: 23 Feb 91 01:13:54 GMT References: <2606.27c462bf@incstar.uucp> Sender: usenet@helios.TAMU.EDU Organization: City of College Station, Texas Lines: 42 In article <2606.27c462bf@incstar.uucp> noyce@incstar.uucp writes: >Just a general question - It appears that if you work in Win 3.0 for >a long time, doing multiple document open/close, either in Excel 2.1d >or Word 4 Windows, that eventually, memory gets so fragmented, that >Win 3.0 appears to 'run out' of memory. At this point, I have found >that the only way to re-coupe this memory, is to exit Win 3.0 to the >C:> prompt, then re-enter Windows. While this isn't a major problem, >it is annoying, since I really don't think I should have to monitor >memory useage myself. After All, Win 3.0 should manage this, and >should allow for the re-allocation of memory, maybe even do periodic >memory re-calibration.. > Unfortunately, Windows 3.0 inherited several things from Windows 2.X, and this is the bug that is biting you (and everybody else). There is a 64K segment in low ( < 640K) memory that is the fixed reference to all the movable stuff that Windows manages. Because this segment, like all 16-bit 80x86 segments, can *only* be 64K, you're stuck. After using Windows for a while, all of this segment is filled with all sorts of housekeeping things. (Window classes, instance thunks, reload thunks, pens, brushes, global memory pointers, etc.) In addition, some (bad) Windows programs do not free up all the resources that they allocate when they finish. This can cause problems. The last problem is a bug in 80386 Windows. In Win 2.X, you could mark some memory as fixed, so Windows couldn't move it and you could use it more easily. Supposedly, marking a segment as fixed in 80286/80386 Win 3.0 would merely mark the *pointer* to it as unchangeable. (For a discussion of why this can work, get a book on 80x86 protected mode programming) Unfortunately, marking a segment as fixed on an 80386 marks it as REALLY FIXED in the 80386 address space, and NOT SWAPPABLE TO DISK. Completely and totaly locked in place. One or two of *those* popping up can really kill Windows performance, as you have seen. -- Jeff Rife P.O. Box 3836 | "Because he was human; because he had goodness; College Station, TX 77844 | because he was moral they called him insane. (409) 823-2710 | Delusions of grandeur; visons of splendor; jlr1801@aim1.tamu.edu | A manic-depressive, he walks in the rain."