[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging emacs memory management
From: |
Eli Zaretskii |
Subject: |
Re: Debugging emacs memory management |
Date: |
Mon, 05 Oct 2015 13:47:08 +0300 |
> From: Dima Kogan <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, address@hidden, address@hidden
> Date: Mon, 05 Oct 2015 03:02:16 -0700
>
> Andreas Schwab <address@hidden> writes:
> > Dima Kogan <address@hidden> writes:
> >
> >> diff --git a/src/font.c b/src/font.c
> >> index 8e06532..ca872d0 100644
> >> --- a/src/font.c
> >> +++ b/src/font.c
> >> @@ -3981,7 +3981,15 @@ copy_font_spec (Lisp_Object font)
> >> pcdr = spec->props + FONT_EXTRA_INDEX;
> >> for (tail = AREF (font, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR
> >> (tail))
> >> if (!EQ (XCAR (XCAR (tail)), QCfont_entity))
> >> - *pcdr = Fcons (XCAR (tail), Qnil), pcdr = xcdr_addr (*pcdr);
> >> + {
> >> + if (CONSP (XCAR (tail)))
> >
> > This better be always true, otherwise XCAR (XCAR (tail)) would be a bug.
>
> It isn't. Without that check I was getting every time.
>
> *ERROR*: Wrong type argument: listp, "monospace-10"
I think what Andreas meant was this: the old code used
XCAR (XCAR (tail)) unconditionally, which seems to indicate that
XCAR (tail) is always a cons cell, and your test should always
yield true.
> Surprised me too, and I haven't checked to see what was happening there.
So maybe your code should include some check for QCfont_entity in the
'else' clause as well.
Btw, isn't 12KB per frame still a lot?
Thanks.
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management, Eli Zaretskii, 2015/10/08
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management, Eli Zaretskii, 2015/10/08
- Re: Debugging emacs memory management, Eli Zaretskii, 2015/10/08
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management, Andreas Schwab, 2015/10/08
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management,
Eli Zaretskii <=
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management, Eli Zaretskii, 2015/10/08
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/08
- Re: Debugging emacs memory management, Eli Zaretskii, 2015/10/08
- Re: Debugging emacs memory management, Dima Kogan, 2015/10/09