[Top][All Lists]

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

Re: t and nil in pure memory?

From: Dan Nicolaescu
Subject: Re: t and nil in pure memory?
Date: Thu, 12 Nov 2009 21:24:05 -0800 (PST)

Stefan Monnier <address@hidden> writes:

  > >> > The last GC before dumping generates 200K calls to mark_object, of 
  > >> > 20K have Qt or Qnil as an argument.
  > >> 
  > >> > Would it make sense to put Qt and Qnil in pure memory?
  > >> 
  > >> No, because they may contain pointers to objects that aren't in pure
  > >> memory (via the plist).
  > > In principle, you could scratch the plist slot from symbols themselves,
  > > and instead make `symbol-plist' go over an EQ hash-table. (Such
  > > externalizing of the symbol plist may make more sense in other dialects
  > > of Lisp where the plist is used less often than in Elisp -- even though
  > > I'm not aware of any implementation which does.)
  > Actually, it's even worse than that: (interned) symbols have a `next'
  > field which points to the next symbol in the obarray (hash) bucket.
  > So that's yet another reason why (pure)symbols can have pointers to non
  > pure memory.

Can't the next pointers could be NULL.
Is the next pointer used for anything else other than GC?
Because if it's not, then it seems that if the next pointer was stored
in the obarray the cache footprint of a Lisp_Symbol would be smaller.

reply via email to

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