[Top][All Lists]

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

Re: All platforms fail with Unicode in menus.

From: David Kastrup
Subject: Re: All platforms fail with Unicode in menus.
Date: 28 Aug 2004 10:08:58 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Jan D." <address@hidden> writes:

> >
> >> +       inhibit_garbage_collection ();
> >
> >> Can someone that knows ENCODE_UTF_8 and garbage collection well
> >> comment on this patch?
> >
> > I don't know either well, but of course that is not the correct way to
> > fix it.  The correct way would be to add appropriate GCPRO and UNGCPRO
> > calls for temporary data structures that should not yet be collected.
> I suspect this must be done in the coding functions.

Well, I glimpsed through the code, and it looked like there was quite
a bit of work involved.  Basically, whenever you have an automatic
Lisp_Object come into being and its life time reaches across some code
that might CONS memory (almost any Lisp code), and it may be the only
pointer to the respective Lisp Object, then you need to GCPRO it.

Glancing through the code looked like there was quite a bit of that.

The results of things like ENCODE_STRING or what it was need to get
into something GCPRO before garbage collection can strike.

> This call to inhibit_garbage_collection was there about two years
> ago (1.234 removed it), and it is still present in macmenu.c, which
> is the only reason the mac port works better.  I suspect the w32
> port also has this problem, but I can't test that port.  I'll work a
> bit more on this, as a temporary solution I checked in this patch.

Yes, as a temporary solution it will work, but it has the disadvantage
that during menu buildup, no old memory will be reclaimed for the
construction of the menus.  And I don't even know how long the effects
of inhibit_garbage_collection will last.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]