public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Bumping _SC_GET*_R_SIZE_MAX to 4096?
@ 2015-07-10 12:58 Carlos O'Donell
  2015-07-11  1:26 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos O'Donell @ 2015-07-10 12:58 UTC (permalink / raw)
  To: GNU C Library, Rich Felker

Over the years I've seen requests to bump
the _SC_GET*_R_SIZE_MAX constant from 1024
to 4096. Apparently there are systems where
the smaller buffer always forces a reallocation
and I'm told that Mac OSX already uses 4096
for these constants.

Are there any implications, other than increased
application memory usage?

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bumping _SC_GET*_R_SIZE_MAX to 4096?
  2015-07-10 12:58 Bumping _SC_GET*_R_SIZE_MAX to 4096? Carlos O'Donell
@ 2015-07-11  1:26 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2015-07-11  1:26 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: GNU C Library

On Fri, Jul 10, 2015 at 08:57:18AM -0400, Carlos O'Donell wrote:
> Over the years I've seen requests to bump
> the _SC_GET*_R_SIZE_MAX constant from 1024
> to 4096. Apparently there are systems where
> the smaller buffer always forces a reallocation
> and I'm told that Mac OSX already uses 4096
> for these constants.

When you say "systems", what exactly do you mean? Are there whole
classes of glibc deployments that need a larger buffer size for some
reason? Or is it just an issue for sites with huge gecos fields or
something?

Given how expensive these lookup operations themselves are, I think
the reallocation itself is negligible. However, if the whole operation
has to be repeated because of unsufficient output buffer space, that's
unfortunate and effectively doubles the lookup time. (Whether this is
the case probably depends on whether nscd is in use...?)

> Are there any implications, other than increased
> application memory usage?

I don't think so, but the proposed increase in memory usage is
somewhat substantial, especially for small systems. Maybe this doesn't
matter in environments where glibc is used/useful, though.

Rich

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-11  1:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 12:58 Bumping _SC_GET*_R_SIZE_MAX to 4096? Carlos O'Donell
2015-07-11  1:26 ` Rich Felker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).