Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-08-05 Thread Andrew Lutomirski
On Jul 30, 2018, at 10:42 AM, Andrew Lutomirski wrote: On Jul 27, 2018, at 9:58 AM, Owen Taylor wrote: On Fri, Jul 27, 2018 at 9:44 AM, Florian Weimer wrote: > On 07/27/2018 03:33 PM, John Reiser wrote:The key principle is that > sizeof(foo) must be the stride of an array of foo, > > and

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-08-01 Thread Carlos O'Donell
On 07/27/2018 06:43 AM, Florian Weimer wrote: > On 07/26/2018 06:03 PM, Jason L Tibbitts III wrote: >>> "FW" == Florian Weimer writes: >> >> FW> I would like to request a change of the Packaging Guidelines, >> FW> advising packagers not to interpose malloc. >> >> How strong of a

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-30 Thread Andrew Lutomirski
On Jul 27, 2018, at 9:58 AM, Owen Taylor wrote: On Fri, Jul 27, 2018 at 9:44 AM, Florian Weimer wrote: > On 07/27/2018 03:33 PM, John Reiser wrote:The key principle is that > sizeof(foo) must be the stride of an array of foo, > > and the array must guarantee alignment of each element in the

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-30 Thread R P Herrold
On Mon, 30 Jul 2018, Jonathan Wakely wrote: > On 26/07/18 12:45 -0400, R P Herrold wrote: > > The use here of 'interpose' is unclear to me -- are you saying > > 'substitute a different' ? > > The usual way to replace 'malloc' is via ELF symbol interposition: >

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-30 Thread Jonathan Wakely
On 26/07/18 22:34 +0200, Florian Weimer wrote: http://www.erahm.org/2016/03/24/minimum-alignment-of-allocation-across-platforms/ Oh dear, this is worrying. I'm adding more places in libstdc++ where the std::lib assumes that memory obtained from malloc will always be aligned to

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-30 Thread Jonathan Wakely
On 26/07/18 12:45 -0400, R P Herrold wrote: On Thu, 26 Jul 2018, Florian Weimer wrote: I would like to request a change of the Packaging Guidelines, advising packagers not to interpose malloc. The use here of 'interpose' is unclear to me -- are you saying 'substitute a different' ? The

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-29 Thread John Reiser
On 07/27/2018 16:58 UTC, Owen Taylor wrote: On Fri, Jul 27, 2018 at 13:44 UTC, Florian Weimer wrote: On 07/27/2018 13:33 UTC, John Reiser wrote:The key principle is that sizeof(foo) must be the stride of an array of foo, and the array must guarantee alignment of each element in the

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread DJ Delorie
Jan Kratochvil writes: > So why glibc greated an N+1 allocator (by DJ Delorie) instead of just > importing/using tcmalloc (which is license-compatible with glibc)? I didn't create an N+1 allocator. We're still using the Doug Lea allocator from ancient times. My recent work added a relatively

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Owen Taylor
On Fri, Jul 27, 2018 at 9:44 AM, Florian Weimer wrote: > On 07/27/2018 03:33 PM, John Reiser wrote:The key principle is that > sizeof(foo) must be the stride of an array of foo, > > and the array must guarantee alignment of each element in the array. >> > > Why do you think that? If some

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Florian Weimer
On 07/27/2018 03:33 PM, John Reiser wrote: On 07/27/2018 08:21 UTC, Florian Weimer wrote: On 07/27/2018 05:10 AM, John Reiser wrote: Always requiring 16-byte alignment on x86_64 can waste too much space due to internal fragmentation.  The rule should be:     The required alignment is at least 

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread John Reiser
On 07/27/2018 08:21 UTC, Florian Weimer wrote: On 07/27/2018 05:10 AM, John Reiser wrote: Always requiring 16-byte alignment on x86_64 can waste too much space due to internal fragmentation.  The rule should be:     The required alignment is at least  min(16, max_p2_divisor_of_size)     where

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Jan Kratochvil
On Thu, 26 Jul 2018 21:14:14 +0200, Carlos O'Donell wrote: > Bug 1430223 - In some conditions, tcmalloc memalign will segfault > https://bugzilla.redhat.com/show_bug.cgi?id=1430223 It looks as a tcmalloc bug which could be fixed; it also has been probably fixed in the meantime as stated there.

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Jan Kratochvil
On Thu, 26 Jul 2018 17:43:06 +0200, Daniel P. Berrangé wrote: > # dnf repoquery --whatrequires 'libjemalloc.so.2()(64bit)' > 389-ds-base-devel-0:1.4.0.11-2.fc28.x86_64 > blender-1:2.79b-2.fc28.x86_64 > blender-1:2.79b-3.fc28.x86_64 > blenderplayer-1:2.79b-2.fc28.x86_64 >

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Florian Weimer
On 07/26/2018 06:03 PM, Jason L Tibbitts III wrote: "FW" == Florian Weimer writes: FW> I would like to request a change of the Packaging Guidelines, FW> advising packagers not to interpose malloc. How strong of a restriction are you looking for? This sort of feels like something which would

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Florian Weimer
On 07/27/2018 05:10 AM, John Reiser wrote: Always requiring 16-byte alignment on x86_64 can waste too much space due to internal fragmentation.  The rule should be:    The required alignment is at least  min(16, max_p2_divisor_of_size)    where the second argument max_p2_divisor_of_size is the

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-27 Thread Vít Ondruch
Dne 26.7.2018 v 20:58 Carlos O'Donell napsal(a): > On 07/26/2018 12:24 PM, Vít Ondruch wrote: >> >> Dne 26.7.2018 v 18:03 Jason L Tibbitts III napsal(a): "FW" == Florian Weimer writes: >>> FW> I would like to request a change of the Packaging Guidelines, >>> FW> advising packagers not

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread John Reiser
* We have resources to support glibc malloc, but not for other mallocs. * Other mallocs  do not follow ABI and provide insufficient alignment. * Choosing a malloc is workload-dependent and forcing a non-default    malloc takes options away from system administrators. Could you please mention a

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread R P Herrold
On Thu, 26 Jul 2018, Florian Weimer wrote: > > Could you please mention a couple of bugs where this is shown? > > https://bugzilla.redhat.com/show_bug.cgi?id=1237260 > https://bugzilla.redhat.com/show_bug.cgi?id=1303323 >

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Florian Weimer
On 07/26/2018 06:45 PM, R P Herrold wrote: On Thu, 26 Jul 2018, Florian Weimer wrote: I would like to request a change of the Packaging Guidelines, advising packagers not to interpose malloc. The use here of 'interpose' is unclear to me -- are you saying 'substitute a different' ? The

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Carlos O'Donell
On 07/26/2018 12:45 PM, R P Herrold wrote: > On Thu, 26 Jul 2018, Florian Weimer wrote: > >> I would like to request a change of the Packaging Guidelines, advising >> packagers not to interpose malloc. > > The use here of 'interpose' is unclear to me -- are you saying > 'substitute a different'

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Carlos O'Donell
On 07/26/2018 12:24 PM, Vít Ondruch wrote: > > > Dne 26.7.2018 v 18:03 Jason L Tibbitts III napsal(a): >>> "FW" == Florian Weimer writes: >> FW> I would like to request a change of the Packaging Guidelines, >> FW> advising packagers not to interpose malloc. >> >> How strong of a restriction

Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread R P Herrold
On Thu, 26 Jul 2018, Florian Weimer wrote: > I would like to request a change of the Packaging Guidelines, advising > packagers not to interpose malloc. The use here of 'interpose' is unclear to me -- are you saying 'substitute a different' ? > The reasons are: > > * We have resources to

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Mark Reynolds
On 07/26/2018 11:43 AM, Daniel P. Berrangé wrote: On Thu, Jul 26, 2018 at 04:37:33PM +0100, Daniel P. Berrangé wrote: On Thu, Jul 26, 2018 at 05:32:32PM +0200, Igor Gnatenko wrote: On Thu, Jul 26, 2018 at 5:29 PM Florian Weimer wrote: I would like to request a change of the Packaging

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Vít Ondruch
Dne 26.7.2018 v 18:03 Jason L Tibbitts III napsal(a): >> "FW" == Florian Weimer writes: > FW> I would like to request a change of the Packaging Guidelines, > FW> advising packagers not to interpose malloc. > > How strong of a restriction are you looking for? This sort of feels > like

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Daniel P . Berrangé
On Thu, Jul 26, 2018 at 11:03:08AM -0500, Jason L Tibbitts III wrote: > > "FW" == Florian Weimer writes: > > FW> I would like to request a change of the Packaging Guidelines, > FW> advising packagers not to interpose malloc. > > How strong of a restriction are you looking for? This sort of

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Jason L Tibbitts III
> "FW" == Florian Weimer writes: FW> I would like to request a change of the Packaging Guidelines, FW> advising packagers not to interpose malloc. How strong of a restriction are you looking for? This sort of feels like something which would at the strongest be a "SHOULD NOT" but maybe

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Daniel P . Berrangé
On Thu, Jul 26, 2018 at 04:37:33PM +0100, Daniel P. Berrangé wrote: > On Thu, Jul 26, 2018 at 05:32:32PM +0200, Igor Gnatenko wrote: > > On Thu, Jul 26, 2018 at 5:29 PM Florian Weimer wrote: > > > > > I would like to request a change of the Packaging Guidelines, advising > > > packagers not to

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Igor Gnatenko
On Thu, Jul 26, 2018 at 5:32 PM Igor Gnatenko < ignatenkobr...@fedoraproject.org> wrote: > On Thu, Jul 26, 2018 at 5:29 PM Florian Weimer wrote: > >> I would like to request a change of the Packaging Guidelines, advising >> packagers not to interpose malloc. >> >> The reasons are: >> >> * We

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Daniel P . Berrangé
On Thu, Jul 26, 2018 at 05:32:32PM +0200, Igor Gnatenko wrote: > On Thu, Jul 26, 2018 at 5:29 PM Florian Weimer wrote: > > > I would like to request a change of the Packaging Guidelines, advising > > packagers not to interpose malloc. > > > > The reasons are: > > > > * We have resources to

Re: Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Igor Gnatenko
On Thu, Jul 26, 2018 at 5:29 PM Florian Weimer wrote: > I would like to request a change of the Packaging Guidelines, advising > packagers not to interpose malloc. > > The reasons are: > > * We have resources to support glibc malloc, but not for other mallocs. > * Other mallocs do not follow

Guideline change: glibc malloc as the C/C++/Rust allocator

2018-07-26 Thread Florian Weimer
I would like to request a change of the Packaging Guidelines, advising packagers not to interpose malloc. The reasons are: * We have resources to support glibc malloc, but not for other mallocs. * Other mallocs do not follow ABI and provide insufficient alignment. * Choosing a malloc is