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: immediate strings #2 Date: Wed, 30 Nov 2011 09:37:01 +0400 Message-ID: <4ED5C0FD.8030301@yandex.ru> References: <4ED35057.8010103@yandex.ru> <4ED4089C.3050203@cs.ucla.edu> <4ED49CC9.6080808@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1322631415 10973 80.91.229.12 (30 Nov 2011 05:36:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2011 05:36:55 +0000 (UTC) Cc: Paul Eggert , Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 30 06:36:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RVcqg-0004Lc-LK for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2011 06:36:50 +0100 Original-Received: from localhost ([::1]:36283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVcqf-00005O-Jr for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2011 00:36:49 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVcqd-00005J-51 for emacs-devel@gnu.org; Wed, 30 Nov 2011 00:36:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVcqb-0004kA-TH for emacs-devel@gnu.org; Wed, 30 Nov 2011 00:36:47 -0500 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:33989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVcqb-0004k4-OY for emacs-devel@gnu.org; Wed, 30 Nov 2011 00:36:45 -0500 Original-Received: by bke17 with SMTP id 17so385610bke.0 for ; Tue, 29 Nov 2011 21:36:43 -0800 (PST) Original-Received: by 10.205.116.80 with SMTP id fh16mr627031bkc.28.1322631403589; Tue, 29 Nov 2011 21:36:43 -0800 (PST) Original-Received: from [192.168.0.171] ([78.153.153.8]) by mx.google.com with ESMTPS id x14sm1578778bkf.10.2011.11.29.21.36.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Nov 2011 21:36:42 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 In-Reply-To: <4ED49CC9.6080808@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 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:146357 Archived-At: On 11/29/2011 12:50 PM, Paul Eggert wrote: > There is a bit available in size (since it's always nonnegative) > but not in size_byte (since it ranges from -1 .. PTRDIFF_MAX > and is a ptrdiff_t, assuming a 32-bit host configured --with-wide-int > and assuming the memory-saving patch of Bug#9874). > > This is in contrast with our current uses of mark bits (e.g., > ARRAY_MARK_FLAG), which use bits that are otherwise unused, even if > a vector has its maximal size. > > We can fairly easily get that bit back from size_byte by restricting > its range to (say) 0 .. PTRDIFF_MAX. > > So this is a fairly minor glitch that can be fixed but is not yet > fixed in the current proposal. It looks like I miss the point. For an immediate strings, we need two extra bits - 1 for GC, 1 for string subtype, so the question is simple: where to get them if both size and size_byte are ptrdiff_t? Dmitry