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: Dynamic loading progress Date: Thu, 19 Nov 2015 19:04:43 +0200 Message-ID: <83h9kh9az8.fsf@gnu.org> References: <877flswse5.fsf@lifelogs.com> <8737wgw7kf.fsf@lifelogs.com> <87io5bv1it.fsf@lifelogs.com> <87egfzuwca.fsf@lifelogs.com> <876118u6f2.fsf@lifelogs.com> <8737w3qero.fsf@lifelogs.com> <831tbn9g9j.fsf@gnu.org> <878u5upw7o.fsf@lifelogs.com> <83ziya8xph.fsf@gnu.org> <83y4du80xo.fsf@gnu.org> <564DF0F6.5060501@cs.ucla.edu> <83k2pe7y44.fsf@gnu.org> <564DFAE1.4010406@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1447952735 7902 80.91.229.3 (19 Nov 2015 17:05:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2015 17:05:35 +0000 (UTC) Cc: aurelien.aptel+emacs@gmail.com, tzz@lifelogs.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 19 18:05:25 2015 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 1ZzSeD-00075s-7p for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2015 18:05:25 +0100 Original-Received: from localhost ([::1]:43084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzSe7-0005X7-IP for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2015 12:05:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzSdt-0005VZ-2B for emacs-devel@gnu.org; Thu, 19 Nov 2015 12:05:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzSdp-0007Aa-5k for emacs-devel@gnu.org; Thu, 19 Nov 2015 12:05:04 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:58088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzSdo-0007A3-Tz for emacs-devel@gnu.org; Thu, 19 Nov 2015 12:05:01 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NY200900NE1VW00@a-mtaout23.012.net.il> for emacs-devel@gnu.org; Thu, 19 Nov 2015 19:04:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NY2009JVNGAVB10@a-mtaout23.012.net.il>; Thu, 19 Nov 2015 19:04:58 +0200 (IST) In-reply-to: <564DFAE1.4010406@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 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:194802 Archived-At: > Cc: tzz@lifelogs.com, aurelien.aptel+emacs@gmail.com, emacs-devel@gnu.org > From: Paul Eggert > Date: Thu, 19 Nov 2015 08:37:53 -0800 > > On 11/19/2015 08:27 AM, Eli Zaretskii wrote: > > The code in module.c runs in Emacs, so I think it's friendly enough > > (apart of the xmalloc issue). Or did I misunderstand what you meant? > > It's the xmalloc issue. That is, if a module contains random C code > inside a library outside of your control that invokes malloc, I suppose > it's a lost cause, we can't memory-profile that. But if as part of a > module you write a wrapper for Emacs, the wrapper code should use > xmalloc rather than malloc, so that at least we can account for its > memory and fail in a standard way if it's not available. That sort of thing. Right. I think we should be able to provide an xmalloc-compatible function for module.c to use, once we know exactly why xmalloc was avoided.