From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.devel Subject: Re: Emacs bzr memory footprint Date: Fri, 21 Oct 2011 21:21:52 +0100 Message-ID: <8762jijdsv.fsf@spindle.srvr.nix> References: <83fwix2osa.fsf@gnu.org> <0B3EE7A4-D0D6-4D1E-ADC4-0BEE68F179B2@mit.edu> <87fwivwp37.fsf@turtle.gmx.de> <87sjmvpmd2.fsf@lifelogs.com> <87aa93wmc4.fsf@turtle.gmx.de> <87sjmnrdjw.fsf@spindle.srvr.nix> <87ty73mc0m.fsf@spindle.srvr.nix> <4EA19111.7060401@yandex.ru> <87r526yzcf.fsf@wanadoo.es> <87k47ykvmm.fsf@spindle.srvr.nix> <83liseqesj.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319228526 13283 80.91.229.12 (21 Oct 2011 20:22:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2011 20:22:06 +0000 (UTC) Cc: ofv@wanadoo.es, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 21 22:22:02 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 1RHLbM-00040N-O2 for ged-emacs-devel@m.gmane.org; Fri, 21 Oct 2011 22:22:00 +0200 Original-Received: from localhost ([::1]:50129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHLbM-0000TM-2O for ged-emacs-devel@m.gmane.org; Fri, 21 Oct 2011 16:22:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHLbJ-0000TB-4S for emacs-devel@gnu.org; Fri, 21 Oct 2011 16:21:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHLbI-0007L0-2z for emacs-devel@gnu.org; Fri, 21 Oct 2011 16:21:57 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:49805 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHLbG-0007Kc-KM; Fri, 21 Oct 2011 16:21:54 -0400 Original-Received: from esperi.org.uk (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.14.5/8.14.5) with ESMTP id p9LKLqmg017521; Fri, 21 Oct 2011 21:21:52 +0100 Original-Received: (from nix@localhost) by esperi.org.uk (8.14.5/8.14.5/Submit) id p9LKLqkV017457; Fri, 21 Oct 2011 21:21:52 +0100 Emacs: because idle RAM is the Devil's playground. In-Reply-To: <83liseqesj.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Oct 2011 22:18:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-DCC-URT-Metrics: spindle 1060; Body=3 Fuz1=3 Fuz2=3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 81.187.191.129 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:145412 Archived-At: On 21 Oct 2011, Eli Zaretskii said: >> From: Nix >> Date: Fri, 21 Oct 2011 20:11:29 +0100 >> Cc: emacs-devel@gnu.org >> >> I'd be scared to trust my data to this one. > > Don't be. It's well tested on many platforms, and the Windows build > still uses it. I don't think there are any bug reports related to it. OK. Doesn't make it less terrifying though. I don't think I've ever seen a clearer example of duelling allocators. :) >> Emacs relies on all of these allocating the buffer storage in a single >> (virtually) contiguous chunk (modulo the gap) > > The buffer text is a contiguous chunk of memory; the gap is just a > portion of that chunk ready to receive inserted text. Exactly. (I think I've implemented buffer-gap-based algorithms three separate times: they seems kludgy, but are so much simpler than pretty much every alternative, and are fast in all but the most uncommon cases.)