Index | Thread | Search

From:
Theo Buehler <tb@theobuehler.org>
Subject:
Re: km_alloc(9) for malloc(9)
To:
tech@openbsd.org
Date:
Tue, 11 Nov 2025 12:17:43 +0100

Download raw body.

Thread
On Mon, Nov 10, 2025 at 05:26:37PM +0000, Martin Pieuchot wrote:
> Diff below gets rid of uvm_km_kmemalloc_pla() and instead use km_alloc(9)
> to allocate malloc(9) chunks.  This is the last piece of the conversion
> started 14 years ago.
> 
> - The M_CANFAIL logic regarding available swap space has been preserved
> and moved into malloc(9).
> 
> - pages returned by uvm_pglistalloc(9) are now dequeued in km_alloc(9)
> to match the behavior of the old allocator.  This will also let us add
> checks to know if pages are part of a list.
> 
> - I didn't bring back the uvm_pagealloc_pg() intentionally, this is not
> useful without `obj' or `anon' associated to the pages.
> 
> I'll take care of the man pages once this is in.

This reads fine to me and hasn't exploded on my laptop since yesterday.

ok tb