tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SYS_sbrk removal proposal



On 20.12.2017 00:24, Brooks Davis wrote:
> On Tue, Dec 19, 2017 at 11:16:30PM +0100, Kamil Rytarowski wrote:
>> sbrk(2) users:
>>  - gpl2/libmalloc
>>  - LLVM (Process::GetMallocUsage())
>>  - am-utils (debug)
>>  - unbound (debug)
>>  - binutils / nm (debug)
>>  - binutils / gas (debug)
>>  - binutils / ld (debug)
>>  - binutils / libiberty (debug)
>>  - gcc / libiberty (debug)
>>  - gdb
> 
> One thing be aware of with the GNU ones: if you want to generate
> binaries that don't use sbrk going forward (a good thing) then you have
> to patch because configure will find it and add a declaration if required
> so long as the symbol resolves.  IIRC binutils will avoid if so long as
> you convince the scripts it's really not there.
> 

I think that the proper order of steps is:
1. Implement mallinfo-like features in jemalloc(3).
2. Revamp libc/gmon.
3. Drop old memory allocators using brk(2)/sbrk(2).
4. .. prepare libc major bump, and drop brk(2)/sbrk(2) entirely.

The GNU software works on platforms without brk(2)/sbrk(2) like cygwin,
so this is not a show-stopper.

> -- Brooks
> 



Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index