Re: malloc() exceeds RLIMIT_DATA

2019-07-11 Thread Graham Percival
On Thu, Jul 11, 2019 at 05:26:34PM +, David Holland wrote: > In practice (across arbitrary platforms) I wouldn't count on malloc > necessarily respecting any of these limits, Indeed, which was probably a large reason why this code is trying to find out how much memory it should use. In our at

Re: malloc() exceeds RLIMIT_DATA

2019-07-11 Thread David Holland
On Wed, Jul 10, 2019 at 08:40:43PM -0700, Graham Percival wrote: > > Ah, but how do you ask malloc to exceed RLIMIT_DATA? Not by passing it > > a large number, or any number, since that doesn't change the size of > > any data segment. > > Aha! I misunderstood "this limit" to mean "the number

Re: malloc() exceeds RLIMIT_DATA

2019-07-10 Thread Graham Percival
On Wed, Jul 10, 2019 at 05:59:05AM +, David Holland wrote: > On Tue, Jul 09, 2019 at 10:24:53AM -0700, Graham Percival wrote: > > RLIMIT_DATA > > This is the maximum size of a data segment of the process, in bytes. If > > this limit is exceeded, the malloc() function shall fail w

Re: malloc() exceeds RLIMIT_DATA

2019-07-09 Thread David Holland
On Tue, Jul 09, 2019 at 10:24:53AM -0700, Graham Percival wrote: > RLIMIT_DATA > This is the maximum size of a data segment of the process, in bytes. If > this limit is exceeded, the malloc() function shall fail with errno set > to > [ENOMEM]. > http://pubs.opengroup.org/

Re: malloc() exceeds RLIMIT_DATA

2019-07-09 Thread Thor Lancelot Simon
On Tue, Jul 09, 2019 at 10:24:53AM -0700, Graham Percival wrote: > On Tue, Jul 09, 2019 at 07:17:39AM +0200, Martin Husemann wrote: > > The classical "data segment" (limited by RLIMIT_DATA) is not used much > > nowadays in NetBSD. Especially malloc() does not use it. > > > > RLIMIT_DATA T

Re: malloc() exceeds RLIMIT_DATA

2019-07-09 Thread Graham Percival
On Tue, Jul 09, 2019 at 07:17:39AM +0200, Martin Husemann wrote: > The classical "data segment" (limited by RLIMIT_DATA) is not used much > nowadays in NetBSD. Especially malloc() does not use it. > > RLIMIT_DATA The maximum size (in bytes) of the data segment for a >

Re: malloc() exceeds RLIMIT_DATA

2019-07-08 Thread Martin Husemann
On Mon, Jul 08, 2019 at 06:06:34PM -0700, Graham Percival wrote: > Thomas Klausner (wiz@) suggested that I write to this list. It appears that > NetBSD's malloc() will allocate more than RLIMIT_DATA's rlim_max. The classical "data segment" (limited by RLIMIT_DATA) is not used much nowadays in Net