[Top][All Lists]

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

Re: GSlice: failed to allocate 504 bytes

From: Ken Brown
Subject: Re: GSlice: failed to allocate 504 bytes
Date: Mon, 19 Nov 2012 16:03:04 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0

On 11/19/2012 11:47 AM, Ken Brown wrote:
On 11/19/2012 11:02 AM, Burton Samograd wrote:

I've built emacs from git sources on a recent cygwin this morning and
when I try and run it, I get the following error on startup before it

     ***MEMORY-ERROR***: [7588]: GSlice: failed to allocate 504 bytes
        (alignment: 512): Function not implemented

This used to be a problem with the gtk build, for which the following
workaround was put into emacs.c long ago:

#if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC)
   /* This is used by the Cygwin build.  */
   setenv ("G_SLICE", "always-malloc", 1);

This is built with --with-x-toolkit=athena

I see the problem.  (And the guess in my previous email was wrong.)

The workaround above was intended to solve a problem on Cygwin whenever the emacs build depended on Glib. When I provided that workaround, I thought this only happened in a GTK build. But I see now that there are other things that can cause emacs to depend on Glib, even in a Lucid build. This happens in both the trunk and the emacs-24 branch.

The following patch fixes it:

=== modified file 'src/emacs.c'
--- src/emacs.c 2012-10-31 17:27:29 +0000
+++ src/emacs.c 2012-11-19 20:50:37 +0000
@@ -702,7 +702,7 @@
   stack_base = &dummy;

-#if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC)
   /* This is used by the Cygwin build.  */
   setenv ("G_SLICE", "always-malloc", 1);

Stefan, is it OK to apply this to the emacs-24 branch? The bug is not a regression, but I think the patch is clearly safe. And it affects only the Cygwin build.


reply via email to

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