UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code. i provided some help
getting swap and paging working, and other bug fixes/ideas. chuck
silvers <chuq@chuq.com> also provided some other fixes.
this is the rest of the MI portion changes.
this will be KNF'd shortly. :-)
down "Data modified on freelist" and "muliple free" problems.
The log is activated by the MALLOCLOG option, and the size of the
event ring buffer is controlable via the MALLOGLOGSIZE option (default
is 100000 entries).
From Chris Demetriou, cleaned up a little by me per suggestions in the
e-mail from Chris that contained the code.
Right now, this code just panic()s (same as kmem_malloc() used to do
before, but different message), but in the future it should be modified
to try to reclaim wasted memory.
(1) do not cast it to (void *), and
(2) print it as 0x%x, rather than %p.
This is not perfect (because the data being printed is "int32_t"-sized), but
is more correct than printing it as a pointer because the data is _not_ a
pointer, it is data to be printed in hex, and on some systems, pointers are
wider than the data items being printed, which leads to excess and misleading
output. The only 'right' solution to this is to have a printf specifier
that prints the fixed-sized types the right way, and that's not really
practical.
error checking in the DIAGNOSTIC case. These changes might be backed out,
if it's decided that MINBUCKET should be 5 (rather than 4) on the alpha.
However, doing that has its own set of nasty consequences.