From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: About string header Date: Thu, 28 Feb 2013 08:47:54 -0500 Message-ID: References: <20130228164942.67904f953de674f38ee25d02@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362059282 22646 80.91.229.3 (28 Feb 2013 13:48:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2013 13:48:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Xue Fuqiao Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 14:48:26 2013 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 1UB3qT-00040g-0U for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2013 14:48:25 +0100 Original-Received: from localhost ([::1]:39939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB3q7-0007F1-O6 for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2013 08:48:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB3q4-0007Eu-Su for emacs-devel@gnu.org; Thu, 28 Feb 2013 08:48:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB3q0-00079l-85 for emacs-devel@gnu.org; Thu, 28 Feb 2013 08:48:00 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB3q0-00079W-3w for emacs-devel@gnu.org; Thu, 28 Feb 2013 08:47:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpaTU/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFFpaTU/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2678016" Original-Received: from 69-165-164-212.dsl.teksavvy.com (HELO pastel.home) ([69.165.164.212]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 28 Feb 2013 08:47:54 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DE9E66BDCD; Thu, 28 Feb 2013 08:47:54 -0500 (EST) In-Reply-To: <20130228164942.67904f953de674f38ee25d02@gmail.com> (Xue Fuqiao's message of "Thu, 28 Feb 2013 16:49:42 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:157452 Archived-At: > What does the "string header" mean here? I had searched the manuals > and source files in src/ but I didn't find anything useful. Every string is made of 2 parts: The first part is a "Lisp_String" struct of fixed size which holds: - the size of the string (in bytes and in chars). - a pointer to the string's text-properties (stored in an "intervals tree"). - a pointer to the second part. The second part are the actual bytes of the string, which are stored elsewhere (and can be relocated so as to compact the memory). The "string header" is the first part. Stefan