History log of /freebsd-13.1/libexec/rtld-elf/rtld_malloc.c (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0
# a3876ab1 12-Oct-2021 Konstantin Belousov <[email protected]>

rtld-elf/paths.h: Make it usable outside rtld

(cherry picked from commit 33dba3bb0ec2a0f0a401bed145cc0ef95f37a5c3)


# 00df1494 15-Oct-2021 Konstantin Belousov <[email protected]>

crt_malloc: more accurate handling of mmap(2) failure

PR: 259076

(cherry picked from commit 73dddffc3175581ba99f6ced9a2e508a0e880e59)


# e5a8b815 11-Oct-2021 Konstantin Belousov <[email protected]>

crt_malloc: Be more persistent when handling mmap() failure

PR: 259076

(cherry picked from commit 19e008e7f79ce55182d227be8513b3fa520471d8)


# cf12f7ba 12-Oct-2021 Konstantin Belousov <[email protected]>

crt_malloc: use uintptr_t instead of long for arithmetic on addresses

(cherry picked from commit 0b72d2965d68113bce16f6cccea77257283ef0a7)


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0
# 38915409 02-Sep-2019 Brooks Davis <[email protected]>

Remove remnants of optimization for > pagesize allocations.

In the past, this allocator seems to have allocated things larger than
a page seperately. Much of this code was removed at some point (per

Remove remnants of optimization for > pagesize allocations.

In the past, this allocator seems to have allocated things larger than
a page seperately. Much of this code was removed at some point (perhaps
along with sbrk() used) so remove the rest. Instead, keep allocating in
power-of-two bins up to FIRST_BUCKET_SIZE << (NBUCKETS - 1). If we want
something more efficent, we should use a fancier allocator.

While here, remove some vestages of sbrk() use. Most importantly, don't
try to page align the pagepool since it's always page aligned by mmap().

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21453

show more ...


# 98ab7906 20-Aug-2019 Brooks Davis <[email protected]>

Remove some compatability with Seventh Edition UNIX realloc().

In Seventh Edition UNIX, the last pointer passed to free() was
guaranteed to not actually have been freed allowing memory to be
"compac

Remove some compatability with Seventh Edition UNIX realloc().

In Seventh Edition UNIX, the last pointer passed to free() was
guaranteed to not actually have been freed allowing memory to be
"compacted" via the following pattern:

free(foo);
foo = realloc(foo, newsize);

Further, Andrew Koenig reports in "C Traps and Pitfalls" that the
original realloc() implementation required this pattern.

The C standard is clear that this is Undefined Behavior. Modern
allocators don't support it and no portable code could rely on it so
remove this support.

Note: the removed implementation contains an off-by-one error and if
an item isn't found on the freelist, then twice as much memory as the
largest possible allocation will be copied.

Reviewed by: kib, imp
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21296

show more ...


Revision tags: release/11.3.0
# 3cac4083 16-May-2019 Konstantin Belousov <[email protected]>

rtld_malloc.c: cleanup morepages().

Use roundup2() and rounddown2() instead of inlining them.
Get rid of the fd local variable, use literal -1 for the mmap argument.
Use MAP_FAILED as mmap(2) failur

rtld_malloc.c: cleanup morepages().

Use roundup2() and rounddown2() instead of inlining them.
Get rid of the fd local variable, use literal -1 for the mmap argument.
Use MAP_FAILED as mmap(2) failure indicator.
After that, apply some style.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

show more ...


# 37f0b7f1 16-May-2019 Konstantin Belousov <[email protected]>

Remove more dead definitions from rtld_malloc.c after r347019.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 5cac2021 02-May-2019 Konstantin Belousov <[email protected]>

Cleanup for rtld_malloc.c.

- Remove dead and most likely rotten MALLOC_DEBUG, MSTAT, and RCHECK options.
- Remove unused headers.
- Remove one case of undefined behavior where left shift could overf

Cleanup for rtld_malloc.c.

- Remove dead and most likely rotten MALLOC_DEBUG, MSTAT, and RCHECK options.
- Remove unused headers.
- Remove one case of undefined behavior where left shift could overflow.
It is impossible on practice for rtld and libthr consumer.

PR: 237577
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

show more ...


# d49ca25d 30-Jan-2019 Konstantin Belousov <[email protected]>

Rename rtld-elf/malloc.c to rtld-elf/rtld_malloc.c.

Then malloc.c file name is too generic to use it for libthr.a.

Sponsored by: The FreeBSD Foundation
MFC after: 13 days