From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: Pseudovectors initialization Date: Tue, 26 Jun 2012 17:07:36 +0400 Message-ID: <4FE9B418.4000709@yandex.ru> References: <4FE9643E.6080004@yandex.ru> <87wr2utfpl.fsf@maru.md5i.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340715933 20805 80.91.229.3 (26 Jun 2012 13:05:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 26 Jun 2012 13:05:33 +0000 (UTC) Cc: Emacs development discussions To: Michael Welsh Duggan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 26 15:05:32 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SjVSR-00035q-Ut for ged-emacs-devel@m.gmane.org; Tue, 26 Jun 2012 15:05:28 +0200 Original-Received: from localhost ([::1]:46674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjVSR-0003Ao-TA for ged-emacs-devel@m.gmane.org; Tue, 26 Jun 2012 09:05:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjVSL-0003AW-KN for emacs-devel@gnu.org; Tue, 26 Jun 2012 09:05:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjVSF-00025j-3p for emacs-devel@gnu.org; Tue, 26 Jun 2012 09:05:21 -0400 Original-Received: from forward17.mail.yandex.net ([95.108.253.142]:33811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjVSE-00023j-LC for emacs-devel@gnu.org; Tue, 26 Jun 2012 09:05:15 -0400 Original-Received: from smtp17.mail.yandex.net (smtp17.mail.yandex.net [95.108.252.17]) by forward17.mail.yandex.net (Yandex) with ESMTP id BEB2D1061BBE; Tue, 26 Jun 2012 17:05:12 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340715912; bh=MeRUDhQq2b0chbXmZo6zdpZDdg97hk6pMLjN2diMHos=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=HX51XSm+Sfm3bAJEdy1eRq1qvx4IsA7SyNxEDeRJhDEYuNz7JuzZXr464MYZEC30v O/bJv6HFBkS+wI0qLO/BJtIC35EOherlfiliFmBYLfm1DqHI6O0ffT0edP7tEnknX/ 19FqFb9zncNlBEeZQLPa9J5UQpcMWWQlEhpN3Tas= Original-Received: from smtp17.mail.yandex.net (localhost [127.0.0.1]) by smtp17.mail.yandex.net (Yandex) with ESMTP id 9B9AB1900199; Tue, 26 Jun 2012 17:05:12 +0400 (MSK) Original-Received: from 213-148-21-55.gelicon.ru (213-148-21-55.gelicon.ru [213.148.21.55]) by smtp17.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 5C4arWx3-5C40bGot; Tue, 26 Jun 2012 17:05:12 +0400 X-Yandex-Rcpt-Suid: md5i@md5i.com X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340715912; bh=MeRUDhQq2b0chbXmZo6zdpZDdg97hk6pMLjN2diMHos=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Z+lg1V++K/DqfrTZVDYBMylUD/oCCjkysmrCuIK4YNEdZzZ5+5q2m7WFqHWZqlp+P Jy3Sl8Oy0xEQ9kZ+bF+sMeQycA7X0gv7ibi9iLVQZQSGaliWLRhTDgnevRPBlLbmGG 0eGMMXIa0MHEa9zs5p+Sjw2ROmsiq8kM5tu0rwGU= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <87wr2utfpl.fsf@maru.md5i.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.253.142 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151180 Archived-At: On 06/26/2012 04:33 PM, Michael Welsh Duggan wrote: > Is it really safe to memset to zero that which should default to Qnil? No, of course. All pseudo-vector objects has tricky layout: pseudo_vector { vectorlike_header; Lisp_Object A; | ... | area visible by GC Lisp_Object Z; | non_lisp_object a; | ... | area invisible for GC non_lisp_object z; | }; Everything from area visible by GC is initialized to Qnil by allocate_pseudovector, and ALLOCATE_PSEUDOVECTOR knows how to evaluate this area's size. This patch zeroes just the rest, i.e. area invisible for GC. Dmitry