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: Aligned blocks management: obsolete? Date: Wed, 20 Jun 2012 11:41:57 -0400 Message-ID: References: <4EE5B744.1090103@yandex.ru> <4EE60A93.9060401@yandex.ru> <4EE6478C.1020701@cs.ucla.edu> <4FE0ADFC.9090504@yandex.ru> <4FE171EC.8000503@yandex.ru> <4FE1D61E.8010204@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340206952 27219 80.91.229.3 (20 Jun 2012 15:42:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2012 15:42:32 +0000 (UTC) Cc: Eli Zaretskii , Paul Eggert , Emacs development discussions To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 20 17:42:31 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 1ShN33-00055v-Iu for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2012 17:42:25 +0200 Original-Received: from localhost ([::1]:47330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShN33-0006nG-Bi for ged-emacs-devel@m.gmane.org; Wed, 20 Jun 2012 11:42:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShN2s-0006lp-IB for emacs-devel@gnu.org; Wed, 20 Jun 2012 11:42:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShN2m-0006E7-Gg for emacs-devel@gnu.org; Wed, 20 Jun 2012 11:42:14 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:20284) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShN2f-0006DD-Dh; Wed, 20 Jun 2012 11:42:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCrYj/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191781466" Original-Received: from 76-10-182-35.dsl.teksavvy.com (HELO pastel.home) ([76.10.182.35]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Jun 2012 11:41:58 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 89D6059086; Wed, 20 Jun 2012 11:41:57 -0400 (EDT) In-Reply-To: <4FE1D61E.8010204@yandex.ru> (Dmitry Antipov's message of "Wed, 20 Jun 2012 17:54:38 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.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:151054 Archived-At: >> I'm not completely sure the test is sufficiently thorough to catch all >> problems, and more importantly it doesn't test the efficiency >> of memalign. > If it's just a matter of configure test, different methods may be used. > For example, attached code checks whether memalign tends to create holes > while allocating (1024 - 8) blocks aligned at 1024-bytes boundary; You want to mix those allocations with a few others of different sizes, since some of the problems show up in those cases (e.g. "memalign(1024); malloc(10); memalign(1024)" might end up wasting 1KB between the malloc and the second memalign). > optimal pad (BLOCK_PADDING in current code) may be detected with the > similar way. That would be good. Stefan