[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Greyed Screens during GC

At  4:53 PM 7/19/94 -0400, Kalman Reti wrote:
>At 10:53 AM 7/19/94 -0400, Ray Pelletier wrote:
>>Is there any way to disable or overide the graying which
>>occasionally occurs during garbage collection.  I remember this
>>being brought up a year or so ago but don't remember the
>>Ray Pelletier
>The best person to answer this (Bill St. Clair) is on vacation, but
>as far as I can tell, the answer is maybe.
>While GC is happening, you still need to process events, and in
>particular update events (e.g. when a window is uncovered).  However,
>since you are in the middle of GCing, you don't really have access to
>the data with which to repaint the uncovered area, so the GC simply
>puts up a constant grey pattern when this occurs.
>My understanding is that there is no way to defer these events, that you
>have to handle them in some way.  If that's true, the only possible changes
>you could make would be to 1) change what constant pattern is used in the
>update process or 2) do a dummy update, i.e. call _BeginUpdate/_EndUpdate
>without actually updating anything, therefore leaving whatever erroneous bits
>were on the screen there for the duration of the GC.
>It's easy to patch the system with resedit to do 2).  Open the CODE 0 resource
>OF A COPY OF MCL (never, ever patch the original in case you do something
>wrong), search for hex a9222f2e0018 (it should only appear once, if it appears
>more than once do not go on), change the 2f2e to 6008 and save the copy.
>Be sure to give the saved copy a name indicative of the fact that it is a
>patched MCL.

Kalman left out only one detail. It is possible to turn off GC
event processing. This will prevent the annoying gray area at the
expense of making your machine unresponsive during GC, even if
MCL is not the front-most application. We (Gary Byers and I) added GC
event processing when we got tired of our mail reader going dead during
a GC that was part of a background MCL compile. Then we discovered that you
couldn't simply ignore update events so we decided to paint a gray region.
In 20/20 hindsight, it would have been better to simply do call
_BeginUpdate/_EndUpdate as does Kalman's patch.

To disable GC event processing:

? (setq ccl::*gc-event-status-bits*
        (logior (- (ash 1 28)) ccl::*gc-event-status-bits*))

To reenable GC event processing:

? (setq ccl::*gc-event-status-bits*
        (logand (1- (ash 1 28)) ccl::*gc-event-status-bits*))