[Top][All Lists]

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

Re: Pseudovectors initialization

From: Stefan Monnier
Subject: Re: Pseudovectors initialization
Date: Wed, 27 Jun 2012 17:22:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>> Is removing this, or removing anything that is set to Qnil safe?
>> It might be from case to case, but it's not obvious...
> It's verified to be safe for windows, frames, processes and terminals.
> ALLOCATE_PSEUDOVECTOR evaluates how many Lisp_Objects are located
> after vectorlike_header, and then calls allocate_pseudovector to
> initialize all of them to Qnil. Next, allocate_{window,frame,process,
> terminal} zeroes the rest. Thus, you need to initialize Lisp_Object
> slot only if it should be non-nil and other slot only if it should
> be non-zero.

There's another exception: slots which are of type Lisp_Object but are
not traced normally by the GC (i.e. are placed in the "non-Lisp" part of the
pseudo-vector).  They're rare, tho (maybe the buffer's undo-log is one
of them).


reply via email to

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