On Wed, Apr 27, 2022 at 08:26:35AM +0200, Gerd Hoffmann wrote:
> > >          if (!highram_start) {
> > > +            if (e - s > BUILD_MAX_HIGHTABLE * 16)
> > > +                highram_size = BUILD_MAX_HIGHTABLE;
> > >              u32 newe = ALIGN_DOWN(e - highram_size, MALLOC_MIN_ALIGN);
> > >              if (newe <= e && newe >= s) {
> > >                  highram_start = newe;
> > 
> > Thanks, but I'm still seeing a corner case where this fails - if
> > ALIGN_DOWN() falls below s.
> 
> Given that the code requires the memory block being 16x the size of the
> zonehigh allocation (i.e. use 16M in case the block is 256M or larger)
> I fail to see how any reasonable alignment requirement can make that
> fail ...

My mistake.

I do think your new v4 version of the code is easier to understand
though.

Cheers,
-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to