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: [Emacs-diffs] /srv/bzr/emacs/trunk r109131: Return more descriptive data from Fgarbage_collect. Date: Wed, 18 Jul 2012 16:46:17 +0400 Message-ID: <5006B019.7010003@yandex.ru> References: <500683FB.6000509@yandex.ru> 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 1342615453 7307 80.91.229.3 (18 Jul 2012 12:44:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2012 12:44:13 +0000 (UTC) Cc: Stefan Monnier To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 18 14:44:10 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 1SrTbu-00049G-54 for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2012 14:44:10 +0200 Original-Received: from localhost ([::1]:49546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrTbt-0000i7-1v for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2012 08:44:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrTbj-0000et-27 for emacs-devel@gnu.org; Wed, 18 Jul 2012 08:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrTbh-00022O-T2 for emacs-devel@gnu.org; Wed, 18 Jul 2012 08:43:58 -0400 Original-Received: from forward9.mail.yandex.net ([77.88.61.48]:40446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrTbh-00022F-GJ for emacs-devel@gnu.org; Wed, 18 Jul 2012 08:43:57 -0400 Original-Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward9.mail.yandex.net (Yandex) with ESMTP id CAFE0CE3FBB; Wed, 18 Jul 2012 16:43:55 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342615435; bh=92p2O+NH3b1pgWMsifdS0X7EDuc7f21h3D/JE4l9K0c=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=CLqlE/dbvxMUnm3x86Hu9ls2E46zBscI1Phln5xj+AEbqBSmV1Fapl0HId4pC70GW pBSe6FsqAI8jpuitgecP7Rm56UwkHOhDwKPita746kPmu3BaGG97yJG6OKwmszVGKJ MGalV2b+75AMXM6J1S+llaMdy6HyGKAq0irAEp7I= Original-Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id A18A91B603A9; Wed, 18 Jul 2012 16:43:55 +0400 (MSK) Original-Received: from 247.gprs.mts.ru (247.gprs.mts.ru [213.87.135.247]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hs2ex2SZ-ht2eqXkL; Wed, 18 Jul 2012 16:43:55 +0400 X-Yandex-Rcpt-Suid: emacs-devel@gnu.org X-Yandex-Rcpt-Suid: monnier@IRO.UMontreal.CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1342615435; bh=92p2O+NH3b1pgWMsifdS0X7EDuc7f21h3D/JE4l9K0c=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=YizBmCNcMEvVXVC2ZuqN4/tPdLveuScswi4THYLEjq6haUYhxh7F3XAjCJDAeQyzV jOnqxAYagT10GAy5fsTJXXSepnN4kp4FA6c+X1jLbRx6i9gYK625hcFUzz9KbbuixX Ei/birp77G+3msD5iECtrCFQAgs9NbPr5mwIQ6mw= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.61.48 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:151733 Archived-At: So, IIUC, you would like to see it as: ((CONS INTERNAL-SIZE USED-CONSES FREE-CONSES) (SYMBOL INTERNAL-SIZE USED-SYMBOLS FREE-SYMBOLS) (MISC INTERNAL-SIZE USED-MISCS FREE-MISCS) (STRING INTERNAL-SIZE USED-STRINGS FREE-STRING) (STRING-BYTES 1 USED-STRING-BYTES) ;; Always 1 means sizeof (char), no 'free' value (VECTOR INTERNAL-SIZE USED-VECTORS) (VECTOR-SLOTS x USED-VECTOR-SLOTS FREE-VECTOR-SLOTS) ;; 'x' is always equal to sizeof (Lisp_Object) (FLOAT INTERNAL-SIZE USED-FLOATS FREE-FLOATS) (INTERVAL INTERNAL-SIZE USED-INTERVALS FREE-INTERVALS) (BUFFER INTERNAL-SIZE USED-BUFFERS)) With this, we will have subtle issue with FREE-VECTOR-SLOTS. Since block allocator coalesces the regions within blocks, sweep_vectors may create, for example, 100 regions of 128 bytes each. On a 64-bit system with sizeof (vectorlike_header) == 16, this space is enough to create 100 vectors of 14 slots each, which means 1400 free slots. But this doesn't mean that this space is enough for 1400/6 = ~230 6-slot vectors: it's enough only for 200 6-slot vectors. Thus, FREE-VECTOR-SLOTS is ambiguous since it depends from future allocation requests - we can't predict how much of the free space will be used for vectorlike_headers and how much will be used to hold vector data. Dmitry