emacs-devel
[Top][All Lists]
Advanced

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

cygwin emacs gtk2 problem fix


From: d.henman
Subject: cygwin emacs gtk2 problem fix
Date: Mon, 07 Jul 2008 09:32:08 +0900

I have found a simple fix to for the cygwin emacs gtk2 problem, as mentioned in 
the etc/PROBLEM file.  I do not have, the proper status to change the cvs 
files, so I am presenting this patch for the etc/PROBLEM file.   The patch 
below describes my fix fo
r the gtk2 emacs crash problem on startup, due to failure to allocate memory.

Regards,
  Darel Henman

For reference, this fix works on my machine which uses the following gtk2 
elements and cygwin version:

glib-2.16.4  , atk-1.9.0 , pixman-0.11.4 , cairo-1.6.4 , pango-1.21.3 , 
gtk+-2.12.11
CYGWIN_NT-5.1 1.5.25(0.156/4/2) 2008-06-12
compiled with: gcc (GCC) 4.3.2 20080619 (prerelease)

 ================ submitted patch for etc/PROBLEMS file follows ================
--- emacs/etc/PROBLEMS
+++ modified-20080707
@@ -233,7 +233,7 @@
 This happens because of bugs in Gtk+.  Gtk+ 2.10 seems to be OK.  See bug
 http://bugzilla.gnome.org/show_bug.cgi?id=85715.
 
-** Emacs compiled with Gtk+ crashes on startup on Cygwin.
+** Emacs compiled with Gtk+ crashes on startup from Cygwin's X11 window.
 
 A typical error message is
   ***MEMORY-ERROR***: emacs[5172]: GSlice: failed to allocate 504 bytes
@@ -241,8 +241,18 @@
 
 Emacs supplies its own malloc, but glib (part of Gtk+) calls memalign and on
 Cygwin, that becomes the Cygwin supplied memalign.  As malloc is not the
-Cygwin malloc, the Cygwin memalign always returns ENOSYS.  A fix for this
-problem would be welcome.
+Cygwin malloc, the Cygwin memalign always returns ENOSYS. 
+
+A fix for this, that worked for me, involves setting the G_SLICE environment
+variable, which allows reconfiguration of the GSlice memory allocator.  It is 
+convenient to do this in your X11's $HOME/.xinitrc file as follows, before any
+"exec emacs &" line in the file, if you have any:
+
+export G_SLICE=always-malloc 
+
+This fix can be easily tested on a cygwin x-window command line by typing:
+  $ export G_SLICE=always-malloc 
+  $ emacs
 
 * General runtime problems
 
 ================ end of submitted etc/PROBLEMS patch ================





reply via email to

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