From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Dynamic loading progress Date: Fri, 20 Nov 2015 19:23:01 +0000 Message-ID: References: <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> <564E5375.3050006@cs.ucla.edu> <564E6045.6030907@cs.ucla.edu> <564E620A.5020709@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1145aa246830440524fdce14 X-Trace: ger.gmane.org 1448047419 6447 80.91.229.3 (20 Nov 2015 19:23:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Nov 2015 19:23:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert , Eli Zaretskii , Ted Zlatanov , =?UTF-8?Q?Aur=C3=A9lien_Aptel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 20 20:23:30 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 1ZzrHO-0004KM-Im for ged-emacs-devel@m.gmane.org; Fri, 20 Nov 2015 20:23:30 +0100 Original-Received: from localhost ([::1]:49490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzrHO-0004Wn-2g for ged-emacs-devel@m.gmane.org; Fri, 20 Nov 2015 14:23:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzrH8-0004WX-RE for emacs-devel@gnu.org; Fri, 20 Nov 2015 14:23:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzrH8-0005iN-1H for emacs-devel@gnu.org; Fri, 20 Nov 2015 14:23:14 -0500 Original-Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:32874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzrH6-0005i3-Es; Fri, 20 Nov 2015 14:23:12 -0500 Original-Received: by wmec201 with SMTP id c201so85854525wme.0; Fri, 20 Nov 2015 11:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=j5+Q8AEEMmleJZxQVZ8v4HSns0kMEG7PYj0mDDa2mSQ=; b=Tgam0VX+j3ha8ITtIoocJGiG7MJDtV31kevKpVwyXytUgidY4EVE2Wpshm9pgAqnqZ gvil4NTqqDoEc4P0g3TgAI0aVWe2OeWB7W+8EdJKQ3lufB/EV6rtXgZRe1Me83W6CmHZ oV0nGbd4+PX1RYQUsuXSXTaxM6WaXvl5smWya6eXwfleJ3OeGkquvNzvsREtRhBNH91v DZHh4UXRkJ6sJ2ISpTOZa4mOX/Bp5TqKvdsow7tc8yqgYkTzyIe064NT2i6AbodqvpHt tfsONKiv1NeUr56VxJuff4L04h6/nL8nADviJRAwQTZbRXNUltSpKRdqZbrIlXeP072S N7EQ== X-Received: by 10.28.17.7 with SMTP id 7mr1539818wmr.45.1448047391811; Fri, 20 Nov 2015 11:23:11 -0800 (PST) In-Reply-To: <564E620A.5020709@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::22b 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:194887 Archived-At: --001a1145aa246830440524fdce14 Content-Type: text/plain; charset=UTF-8 Paul Eggert schrieb am Fr., 20. Nov. 2015 um 00:58 Uhr: > On 11/19/2015 03:55 PM, Philipp Stephani wrote: > > Modules cannot (legally) call xmalloc. They need to obtain memory > > using malloc or any other standard function. In general, modules > > cannot call any functions except those declared in emacs-module.h. > > I'm suggesting that we declare a memory allocator in emacs-module.h. > Sorry if that wasn't clear. > We can do that, but I don't expect modules to use it. Modules will typically be used to wrap existing C or C++ libraries or make heavy use of such libraries, and those libraries won't use an Emacs-specific allocator. What could go wrong if modules use malloc for memory allocation? --001a1145aa246830440524fdce14 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Paul E= ggert <eggert@cs.ucla.edu> = schrieb am Fr., 20. Nov. 2015 um 00:58=C2=A0Uhr:
On 11/19/2015 03:55 PM, Philipp Stephani wrote:
> Modules cannot (legally) call xmalloc. They need to obtain memory
> using malloc or any other standard function. In general, modules
> cannot call any functions except those declared in emacs-module.h.

I'm suggesting that we declare a memory allocator in emacs-module.h. Sorry if that wasn't clear.

We can = do that, but I don't expect modules to use it. Modules will typically b= e used to wrap existing C or C++ libraries or make heavy use of such librar= ies, and those libraries won't use an Emacs-specific allocator.
What could go wrong if modules use malloc for memory allocation?
--001a1145aa246830440524fdce14--