From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Aligned blocks management: obsolete? Date: Thu, 21 Jun 2012 19:29:39 +0300 Message-ID: <83fw9od3ws.fsf@gnu.org> 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> <83vcildi46.fsf@gnu.org> <4FE2A2A2.5080904@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1340296238 21293 80.91.229.3 (21 Jun 2012 16:30:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2012 16:30:38 +0000 (UTC) Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 21 18:30:37 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 1ShkHB-0003qf-Rp for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2012 18:30:33 +0200 Original-Received: from localhost ([::1]:35510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShkHB-0004KD-Ra for ged-emacs-devel@m.gmane.org; Thu, 21 Jun 2012 12:30:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShkH5-0004JO-S6 for emacs-devel@gnu.org; Thu, 21 Jun 2012 12:30:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShkGt-00041F-DF for emacs-devel@gnu.org; Thu, 21 Jun 2012 12:30:26 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:44443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShkGt-00040a-4N for emacs-devel@gnu.org; Thu, 21 Jun 2012 12:30:15 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M5Z00C00731TK00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 21 Jun 2012 19:29:26 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M5Z00CWO74ZO660@a-mtaout23.012.net.il>; Thu, 21 Jun 2012 19:29:23 +0300 (IDT) In-reply-to: <4FE2A2A2.5080904@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 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:151073 Archived-At: > Date: Thu, 21 Jun 2012 08:27:14 +0400 > From: Dmitry Antipov > CC: monnier@iro.umontreal.ca, eggert@cs.ucla.edu, emacs-devel@gnu.org > > > P.S. If memory fragmentation is what you worry about, then doesn't > > ralloc.c free us from this, on platforms that use it? > > I don't know how ralloc.c works. It hooks into sbrk, and when malloc asks for more memory by calling sbrk, ralloc.c relocates buffer text trying to free a bug enough chunk, before it lets the call to sbrk to proceed. > In general, I believe moving/compacting GC is the only way to reduce > fragmentation; since current design makes it impossible to > move/compact Lisp objects, any underlying allocator can't really > help to reduce fragmentation. Maybe I don't understand what you mean by move/compact, but aren't buffer text and data of a Lisp string already designed to support such moving/compacting? The pointer to the text is obtained by a second dereference, so the Lisp object representing buffer and string stays unmodified when the text is relocated.