Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Recent bugfixes.



Den 2023-03-26 kl. 18:29, skrev Rhialto:
On Sun 26 Mar 2023 at 16:28:52 +0200, Anders Magnusson wrote:
Please look at the patch:
[ correctly limits the total size ]

After everything is calculated I check if kvmsize gets larger than 1G, and
in that case truncates it to 1G.
I haven't changed the calculations.
But that's my point. For smaller memory sizes, it likely calculates a
bigger page table size than needed (by counting things double) (and thus
wastes memory on the page table).

That is of course a different bug, but now that we're looking at
this area of code we might well think about how it should be.
That is the problem - there is no usable way to know how much virtual memory is needed in advance since most data structures is allocated on demand. Doubling avail_end seemed to be a working way to match the memory that might be allocated (by using empirical tests, some 20 years ago).

There maybe is a better way to do this, feel free to work on it :-)

in 4.xBSD on vax everything was compile-time options, hence the needed sizes was known at compile time.

-- Ragge



Home | Main Index | Thread Index | Old Index