From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: When should ralloc.c be used? Date: Mon, 24 Oct 2016 19:00:17 +0300 Message-ID: <838ttd4u0e.fsf@gnu.org> References: <7baa18d4-2b09-caa8-005e-29008a383ad1@cs.ucla.edu> <83mvhwrgd5.fsf@gnu.org> <8539f38f-9a11-44c3-4de7-bb974c96206c@cs.ucla.edu> <838ttfnmev.fsf@gnu.org> <837f8znk8f.fsf@gnu.org> <83zilvm2ud.fsf@gnu.org> <83r377m0i8.fsf@gnu.org> <83eg36n6v5.fsf@gnu.org> <83shrl523p.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477326579 22537 195.159.176.226 (24 Oct 2016 16:29:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2016 16:29:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 24 18:29:35 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1byi7b-00035M-32 for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 18:29:11 +0200 Original-Received: from localhost ([::1]:47987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byi7d-0003pc-Eu for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2016 12:29:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhfl-0006EM-Oc for emacs-devel@gnu.org; Mon, 24 Oct 2016 12:00:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byhfg-00076E-C0 for emacs-devel@gnu.org; Mon, 24 Oct 2016 12:00:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byhfg-00076A-8l; Mon, 24 Oct 2016 12:00:20 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2284 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1byhff-0001K6-Kd; Mon, 24 Oct 2016 12:00:20 -0400 In-reply-to: (message from Stefan Monnier on Mon, 24 Oct 2016 10:12:27 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208702 Archived-At: > From: Stefan Monnier > Date: Mon, 24 Oct 2016 10:12:27 -0400 > > >> But I fail to see what's hard about changing that to "rel_alloc=no, > >> mmap=yes". > > Why do we need mmap at all? Why not just use malloc (as implemented > > by gmalloc)? > > AFAIU the reason we use ralloc is because of memory fragmentation, and > mmap brings similar benefits. But we have successfully used the glibc's malloc, without mmap, for years without any sign of fragmentation problems. So these fragmentation problems are not as bad as they sound, at least in one malloc implementation.