Change the way malloc_init() works so that the main data structures
authorotto <otto@openbsd.org>
Tue, 27 Dec 2022 17:31:09 +0000 (17:31 +0000)
committerotto <otto@openbsd.org>
Tue, 27 Dec 2022 17:31:09 +0000 (17:31 +0000)
commite70a8168170aa2c12e7bb6f55373965f1af3174b
tree8d5e60e6c84e9c527b324c1acc6fb7fcb16ffd0a
parent87ef6183adddb0c1d168ee653e98556ee48c52da
Change the way malloc_init() works so that the main data structures
can be made immutable to provide extra protection.  Also init pools
on-demand: only pools that are actually used are initialized.

Tested by many
lib/libc/stdlib/malloc.c