emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building without Emacs malloc, possible?


From: Jan Djärv
Subject: Re: Building without Emacs malloc, possible?
Date: Thu, 22 Feb 2007 07:57:59 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070212)



Eli Zaretskii skrev:
Date: Wed, 21 Feb 2007 21:31:17 +0100
From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= <address@hidden>

What is the status of building without Emac malloc? There are some problems on cygwin + Gtk. Basically Gtk+ (glib actually) calls memalign, but on cygwin this does not call the Emacs supplied memalign, but cygwins own. Since malloc is the one Emacs has, cygwin memalign refuses to work. I don't know why the Emace memalign is not called, dynamic libraries on W32 seems to behave strange in this regard.

That is very unfortunate.  Using system malloc will cause Emacs to
grow in its footprint much more than it does with gmalloc, possibly an
unlimited growth.  Did you try asking for advice on the Cygwin mailing
list?

Yes, the advice was that Emacs should not use its own malloc in this case. If that works, I'll add a configure check so that Emacs uses its own malloc on cygwin except when Gtk+ is used. I still don't understand why the Emacs supplied memalign doesn't get called.


One solution would be for Emacs to not use its own malloc, but that gives compilation errors. I don't have the errors here, but they are unresolved symbols in vm-limit.c.

So, the question is what is need to compile on cygwin without Emacs malloc? I just added

#define SYSTEM_MALLOC

to s/cygwin.h.  Apparently something more is needed.

Defining SYSTEM_MALLOC ought to be enough.  What errors do you see?
Do the same errors happen when you try building with SYSTEM_MALLOC on
GNU/Linux?

Btw, I think you need to "make distclean" and reconfigure after adding
SYSTEM_MALLOC; maybe you didn't, and that's the reason for the
problems?

I'll try again with that when I get access to the w32 machine again. Thanks for the advice.

        Jan D.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]