emacs-devel
[Top][All Lists]
Advanced

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

Re: GSlice: failed to allocate 504 bytes


From: Burton Samograd
Subject: Re: GSlice: failed to allocate 504 bytes
Date: Mon, 19 Nov 2012 14:48:23 -0700
User-agent: Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.2.50 (cygwin)

Ken Brown <address@hidden> writes:

> On 11/19/2012 11:47 AM, Ken Brown wrote:
>> On 11/19/2012 11:02 AM, Burton Samograd wrote:
>>> Hello,
>>>
>>> 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
>>> crashes:
>>>
>>>      ***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);
>> #endif
>>
>>> 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;
>   #endif
>
> -#if defined (USE_GTK) && defined (G_SLICE_ALWAYS_MALLOC)
> +#ifdef G_SLICE_ALWAYS_MALLOC
>     /* This is used by the Cygwin build.  */
>     setenv ("G_SLICE", "always-malloc", 1);
>   #endif
>
>
> 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.

That patch worked for me, and the build no-longer crashes on
startup. Thanks.

--
Burton Samograd




reply via email to

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