History log of /openbsd-src/lib/libc/stdlib/malloc.c (Results 51 – 75 of 297)
Revision Date Author Comments
# 1251cd2e 06-Mar-2018 deraadt <deraadt@openbsd.org>

use _ALIGN() which is uhm a bit OpenBSD-specific, but it means we
don't need to use sys/param.h at all, guess which one i believe is
greater namespace polution
ok otto


# 15946616 05-Mar-2018 deraadt <deraadt@openbsd.org>

Use _MAX_PAGE_SHIFT, rather than #ifdef mips64
ok guenther kettenis


# c8c7c5c0 07-Feb-2018 otto <otto@openbsd.org>

use consistent style for for loop in unmap(), no functional change


# 18ee316a 30-Jan-2018 otto <otto@openbsd.org>

keep in sync with ld.so malloc.c


# 4eb20113 28-Jan-2018 otto <otto@openbsd.org>

- An error in the multithreaded case could print the wrong function name
- Start with a full page of struct region_info's
- Save an mprotect in the init code: allocate 3 pages with none and
make th

- An error in the multithreaded case could print the wrong function name
- Start with a full page of struct region_info's
- Save an mprotect in the init code: allocate 3 pages with none and
make the middle page r/w instead of a r/w allocation and two calls to make the
guard pages none

show more ...


# bb4207f0 26-Jan-2018 otto <otto@openbsd.org>

- do not junk pages returned by free_bytes(), all freed chunks are already
junked
- freezero(): only clear requested size


# 727b4785 18-Jan-2018 otto <otto@openbsd.org>

Zap the rotor, it was a wrong idea. Cluebat applied by kshe who
came also up with this diff. Simple, no bias and benchmarks show the extra
random calls disappear in te measurement noise.


# 09243208 18-Jan-2018 otto <otto@openbsd.org>

Move to ffs(3) for bitmask scanning. I played with this earlier,
but at that time ffs function calls were generated instead of the
compiler inlining the code. Now that ffs is marked protected in
lib

Move to ffs(3) for bitmask scanning. I played with this earlier,
but at that time ffs function calls were generated instead of the
compiler inlining the code. Now that ffs is marked protected in
libc this is handled better. Thanks to kshe who prompted me to
look at this again.

show more ...


# f5590649 08-Jan-2018 otto <otto@openbsd.org>

optimization and some cleanup; mostly from kshe (except the unmap() part)


# f1bd57a0 01-Jan-2018 otto <otto@openbsd.org>

Only init chunk_info once, plus some moving of code to group related functions.


# 9358f2b4 27-Dec-2017 otto <otto@openbsd.org>

step one in avoiding unneccesary init of chunk_info;
some cleanup; tested by sthen@ on a ports build


# 2c0491e3 02-Nov-2017 otto <otto@openbsd.org>

's' should include 'f'; from Jacqueline Jolicoeur


# aaa9311b 19-Oct-2017 jsing <jsing@openbsd.org>

Restore a return that was inadvertently removed from freezero() in r1.234,
which results in an internal double free when internal functions are not
in use.

ok otto@


# 95d8e5b2 05-Oct-2017 otto <otto@openbsd.org>

do not return f() where f is a void function; loop var type fix


# 9039ddc1 05-Oct-2017 otto <otto@openbsd.org>

Use dprintf instead of snprintf/write


# 21c4b148 23-Sep-2017 otto <otto@openbsd.org>

Make delayed free non-optional and make F do an extensive double free check.
ok tb@ tedu@


# 549c30d5 12-Sep-2017 otto <otto@openbsd.org>

mapalign returns MAP_FAILED for failuer; from George Koehler


# 5f2d17ff 11-Sep-2017 otto <otto@openbsd.org>

check double free before canary for chunks; ok millert@


# 85a65ef1 20-Aug-2017 otto <otto@openbsd.org>

two MALLOC_STATS only tweaks; one from David CARLIER, the other found by clang


# c4a37232 10-Jul-2017 otto <otto@openbsd.org>

one more instance of the previous commit; also initialize ->offset to a
definite value in the size == 0 case


# b73b8be1 07-Jul-2017 otto <otto@openbsd.org>

Only access offset if canaries are enabled *and* size > 0, otherwise offset
is not initialized. Problem spotted by Carlin Bingham; ok phessler@ tedu@


# f933361f 19-Jun-2017 dlg <dlg@openbsd.org>

port the RBT code to userland by making it part of libc.

src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with
annotations for symbol visibility. changes to one should be reflected

port the RBT code to userland by making it part of libc.

src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with
annotations for symbol visibility. changes to one should be reflected
in the other.

the malloc debug code that uses RB code is ported to RBT.

because libc provides the RBT code, procmap doesn't have to reach into
the kernel and build subr_tree.c itself now.

mild enthusiasm from many
ok guenther@

show more ...


# 48c91247 13-May-2017 otto <otto@openbsd.org>

- fix bug wrt posix_memalign(3) of blocks between half a page and a page
- document posix_memalign() does not play nice with reacallocarray(3) and
freezero(3)


# e825de79 22-Apr-2017 otto <otto@openbsd.org>

For small allocations (chunk) freezero only validates the given
size if canaries are enabled. In that case we have the exact requested
size of the allocation. But we can at least check the given siz

For small allocations (chunk) freezero only validates the given
size if canaries are enabled. In that case we have the exact requested
size of the allocation. But we can at least check the given size
against the chunk size if C is not enabled. Plus add some braces
so my brain doesn't have to scan for dangling else problems when I
see this code.

show more ...


# a115f96b 18-Apr-2017 otto <otto@openbsd.org>

don't forget to fill in canary bytes for posix_memalign(3); reported by
and ok jeremy@


12345678910>>...12