From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13978 invoked by alias); 14 Aug 2013 08:10:08 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 13912 invoked by uid 89); 14 Aug 2013 08:10:07 -0000 X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED autolearn=ham version=3.3.2 Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 14 Aug 2013 08:10:06 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id A33D2520D3A; Wed, 14 Aug 2013 10:10:03 +0200 (CEST) Date: Wed, 14 Aug 2013 08:10:00 -0000 From: Corinna Vinschen To: cygwin-xfree@cygwin.com Subject: Re: [ANNOUNCEMENT] Uploads for 12 August Message-ID: <20130814081003.GA29227@calimero.vinschen.de> Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com References: <520A01DF.1040208@alice.it> <520A21B1.8060503@alice.it> <520A3EF6.80700@cornell.edu> <520A7654.3080207@users.sourceforge.net> <20130813182653.GA4315@calimero.vinschen.de> <520AAC65.1090708@cornell.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline In-Reply-To: <520AAC65.1090708@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Found: No X-SW-Source: 2013-08/txt/msg00026.txt.bz2 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2669 On Aug 13 18:00, Ken Brown wrote: > On 8/13/2013 2:26 PM, Corinna Vinschen wrote: > >On Aug 13 13:09, Yaakov (Cygwin/X) wrote: > >>On 2013-08-13 09:13, Ken Brown wrote: > >>>Yaakov, is there any chance that you could patch Glib to do the > >>>equivalent of G_SLICE=3Dalways-malloc on Cygwin? This isn't really an > >>>emacs issue. It would affect any GTK application that provides its own > >>>malloc rather than using Cygwin's malloc. (But emacs is probably the > >>>only such application in the distro.) > >> > >>Given that the only programs which seem to be *practically* affected > >>by this is our Emacs, and Firefox/Thunderbird/etc. (which we don't > >>have yet), and using G_SLICE=3Dalways-malloc apparently affects > >>performance, I don't think that would be an appropriate solution. > >> > >>For now, I think you'll have to add a wrapper script. > > > >Can anybody of you explain to me what the actual underlying problem is? > >I mean, why this error message: > > > > ***MEMORY-ERROR***: [3044]: GSlice: failed to allocate 504 bytes > > (alignment: 512): Function not implemented > > > >What function is not implemented? Is that something we can fix, > >perhaps in the Cygwin DLL? >=20 > It's memalign, or at least that's what it was in 2007. See >=20 > http://cygwin.com/ml/cygwin/2007-02/msg00678.html So it's using its own malloc but we don't support overriding other functions besides malloc/realloc/calloc/free. In theory we could do that in future. We still have room for 10 (x86) resp. 12 (x86_64) pointers in the per_process structure, which could be used for this purpose. This would only require applications which need this feature to be rebuilt with the next Cygwin version providing these pointers. But we shouldn't waste those unused slots either, so the number of overridable functions should be kept small. In theory we have mallopt, mallinfo, posix_memalign, memalign, and valloc. I guess we can skip mallopt and mallinfo since they are pretty seldomly used in user-provided malloc implementations. Memalign is an old, deprecated function, so I wonder why it's used at all. GSlice should use posix_memalign instead. Yaakov, is there an option to use posix_memalign rather than memalign? Anyway, that would be three extra pointers in the per_process structure, for memalig, posic_memalign, and valloc, and we could get rid of the `if (!use_internal) set_errno(ENOSYS);' in those functions and rather call the user provided functions then. Does that make sense? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQIcBAEBAgAGBQJSCztbAAoJEPU2Bp2uRE+gansP/jYnGhvpZWiG7kgbxocQ3g2M z2fPXoHcKBoVdNhOHx+wLzscu3vhQYoGB77gABMGCqIPGyMVhUxYBmM0wXIsubu3 DabZ/gXQNrjI8joSdR8HxVkIddW+oYbqaC/MxXyf5tUnqsqOK0h90tX3GMis6GHU 8xljQfx4FjnsrkEJzIFcpmBl72yU5MR5wOSbEkuBjC/Gebs1dyfliSJswsDQL2/p GFEGS84tIzz/8KsgrED5IVb36Z4/BF+19pdGvm9sd2FHRfIr0nHEGymn2qEXdqps EOc6fCwJdYiNEya1tR2SSxuE/o4OEW0rFc3Iv00d8/6Rgu+761O8SA9w+ZrHRlxc qbjJL0dEKFr88j9f40ySskA4H+t04T/zDzRgMdoj/BiNtHMxx9ggqLKF+Fe28GqC KrwWa4+HD3PpFupPBK+RwCuHm+YemNyrXq0BPnjYaGYsv44TxciT6QAYRhmPamAY qkION0q2FEnJjO9lLqhzzpNCxKD6ba1G9ET7v4fI/rIFZ5cdE9KJQED0eyJEKMGW 85YW5pcTpEzx+n6GxdaFr5JEuUYOoSIoJchzI7k11OymlSas6/RMwYxVJbImRrYn MkXczG+FRXtr/RowiEXfwe5h5I53GY92yAqW1Qcw0sRk/pbFthckyFSyi4ljSVWi pgMwrVHue70+/0eF5a/A =TvAA -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--