sbrk() failure while processing tunables

Siddhesh Poyarekar siddhesh@sourceware.org
Wed Nov 3 03:12:28 GMT 2021


On 11/3/21 01:26, Adhemerval Zanella via Libc-alpha wrote:
>> Straight up mmap should be fine I think.  AFAICT, we should have to allocate exactly once, to copy the tunable string.
> 
> Does it make sense to use rtld_malloc then to try optimize the allocation a bit?

That'll work only for the dynamic case, you'll need special code for 
static linking then.  Alternatively, the rtld_malloc code looks 
sufficiently independent that it could be split out into its own file 
and included directly into dl-tunables.c.

Siddhesh


More information about the Libc-alpha mailing list