Age | Commit message (Collapse) | Author |
|
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
|
<uvm/uvm.h> if possible and remove double inclusions.
ok beck@, mlarkin@, deraadt@
|
|
tested on vax (gcc3) ok miod@
|
|
ok miod@
|
|
in MI code; gcc 2.95 does not accept such annotation for function pointer
declarations, only function prototypes.
To be uncommented once gcc 2.95 bites the dust.
|
|
function pointer arguments which are {used as,} wrappers around the kernel
printf function.
No functional change.
|
|
ok kettenis
|
|
and add a missing argument to one of the printf calls.
ok art@
|
|
to separate locking, on most modern machines this is not enough
since operations on short types touch other short types that share the
same word in memory.
Merge pg_flags and pqflags again and now use atomic operations to change
the flags. Also bump wire_count to an int and pg_version might go
int as well, just for alignment.
tested by many, many. ok miod@
|
|
kmem_object) just so that we can remove them, just use pmap_extract
to get the pages to free and simplify a lot of code to not deal with
the list of intrsafe maps, intrsafe objects, etc.
miod@ ok
|
|
to "pg_flags" and "pg_version", so that they are a bit easier to work with.
Whoever uses generic names like this for a popular struct obviously doesn't
read much code.
Most architectures compile and there are no functionality changes.
deraadt@ ok ("if something fails to compile, we fix that by hand")
|
|
in malloc_debug.
Also, add an assert-like function to sprinkle in code you're debugging at the
moment. Those asserts are _not_ supposed to be ever comitted, just use them
while debugging.
beck@ ok
|
|
|
|
If the kernel is compiled with MALLOC_DEBUG, M_DEBUG will force the allocation
to be done through malloc_debug.
|
|
|
|
This can happen when debug_malloc_init calls pool_init which calls
malloc (because the kernel is built with POOL_DIAGNOSTIC) which in turn
calls debug_malloc and debug_malloc just happens to trigger on all memory
allocations.
This allows us to run a kernel debugging _all_ allocations.
|
|
We'll never want to exec code in malloc mappings.
|
|
|
|
well (not at all) with shortages of the vm_map where the pages are mapped
(usually kmem_map).
Try to deal with it:
- group all information the backend allocator for a pool in a separate
struct. The pool will only have a pointer to that struct.
- change the pool_init API to reflect that.
- link all pools allocating from the same allocator on a linked list.
- Since an allocator is responsible to wait for physical memory it will
only fail (waitok) when it runs out of its backing vm_map, carefully
drain pools using the same allocator so that va space is freed.
(see comments in code for caveats and details).
- change pool_reclaim to return if it actually succeeded to free some
memory, use that information to make draining easier and more efficient.
- get rid of PR_URGENT, noone uses it.
|
|
misc pmap usage fixes.
|
|
(Look ma, I might have broken the tree)
|
|
|
|
|
|
useful changes (and a lot of cleanup). Bring in them.
|
|
From Heikki Korpela <heko@iki.fi>
|
|
Noted by: Heikki Korpela <heko@iki.fi>
|
|
The archs that didn't have a proper PMAP_NEW now have a dummy implementation
with wrappers around the old functions.
|
|
the size we are trying to allocate and not the size of the bucket
and malloc_debug is not capable of debugging a prticular bucket, only
a size, add a possibility to specify a size range.
|
|
|
|
that address.
|
|
|
|
|
|
Add an #error instead of breaking while compiling.
|
|
Make sure you read the docs (malloc(9)) before use.
|