diff options
author | green <green@FreeBSD.org> | 2004-08-02 00:18:36 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-08-02 00:18:36 +0000 |
commit | 9532ab7116a36e60ae15ec463c757a7d2e7f9b39 (patch) | |
tree | ff53102435294d83e0ddcbd011824aa65f84e3c8 /sys/vm/uma_dbg.h | |
parent | 14a50c4ac0247a8950847156b4fc16cf935c14ca (diff) | |
download | FreeBSD-src-9532ab7116a36e60ae15ec463c757a7d2e7f9b39.zip FreeBSD-src-9532ab7116a36e60ae15ec463c757a7d2e7f9b39.tar.gz |
* Add a "how" argument to uma_zone constructors and initialization functions
so that they know whether the allocation is supposed to be able to sleep
or not.
* Allow uma_zone constructors and initialation functions to return either
success or error. Almost all of the ones in the tree currently return
success unconditionally, but mbuf is a notable exception: the packet
zone constructor wants to be able to fail if it cannot suballocate an
mbuf cluster, and the mbuf allocators want to be able to fail in general
in a MAC kernel if the MAC mbuf initializer fails. This fixes the
panics people are seeing when they run out of memory for mbuf clusters.
* Allow debug.nosleepwithlocks on WITNESS to be disabled, without changing
the default.
Both bmilekic and jeff have reviewed the changes made to make failable
zone allocations work.
Diffstat (limited to 'sys/vm/uma_dbg.h')
-rw-r--r-- | sys/vm/uma_dbg.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/uma_dbg.h b/sys/vm/uma_dbg.h index 5b44056..200f05d 100644 --- a/sys/vm/uma_dbg.h +++ b/sys/vm/uma_dbg.h @@ -37,15 +37,15 @@ #ifndef VM_UMA_DBG_H #define VM_UMA_DBG_H -void trash_ctor(void *mem, int size, void *arg); +int trash_ctor(void *mem, int size, void *arg, int flags); void trash_dtor(void *mem, int size, void *arg); -void trash_init(void *mem, int size); +int trash_init(void *mem, int size, int flags); void trash_fini(void *mem, int size); /* For use only by malloc */ -void mtrash_ctor(void *mem, int size, void *arg); +int mtrash_ctor(void *mem, int size, void *arg, int flags); void mtrash_dtor(void *mem, int size, void *arg); -void mtrash_init(void *mem, int size); +int mtrash_init(void *mem, int size, int flags); void mtrash_fini(void *mem, int size); void uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item); |