Paul Eggert <[email protected]> writes:

> On 2025-09-10 19:14, Collin Funk wrote:
>> A red-black tree, for example, would probably fix the performance
>> of get_memnode.
>
> My thought is to not worry about it. If we head in that direction then
> next thing, we might want it to be thread-safe, and the thing after
> that, we might want it to be high-performance multithreaded, and
> before we know it we have lots more lines of code to maintain. That's
> overkill for this particular problem.

Good point.

> Simplicity is good here, so let's just rely on the underlying
> libraries instead. And if that means we gotta use malloc and waste a
> page per allocation then let's do that.

Sounds good. I think the best plan is to write a test module for
pagealign_alloc, i.e. make sure the returned address is aligned and all
the allocated memory can be written to.

Afterwards, we can use Bruno's CI to see that our changes are portable.

I'll have a look at writing a test module if no one beats me to it.

Collin

Reply via email to