42#include <sys/bitset.h>
43#include <sys/kernel.h>
48#include <sys/malloc.h>
79 for (p = mem; cnt > 0; cnt--, p++)
82 panic(
"Memory modified after free %p(%d) val=%x @ %p\n",
85 printf(
"Memory modified after free %p(%d) val=%x @ %p\n",
112 for (p = mem; cnt > 0; cnt--, p++)
144 struct malloc_type **ksp;
153 size -=
sizeof(
struct malloc_type *);
154 ksp = (
struct malloc_type **)mem;
155 ksp += size /
sizeof(
struct malloc_type *);
158 for (p = mem; cnt > 0; cnt--, p++)
160 printf(
"Memory modified after free %p(%d) val=%x @ %p\n",
162 panic(
"Most recently used by %s\n", (*ksp == NULL)?
163 "none" : (*ksp)->ks_shortdesc);
185 size -=
sizeof(
struct malloc_type *);
188 for (p = mem; cnt > 0; cnt--, p++)
201 struct malloc_type **ksp;
210 ksp = (
struct malloc_type **)mem;
211 ksp += (size /
sizeof(
struct malloc_type *)) - 1;
int is_memguard_addr(void *addr)
void trash_fini(void *mem, int size)
int mtrash_ctor(void *mem, int size, void *arg, int flags)
void trash_dtor(void *mem, int size, void *arg)
static const uint32_t uma_junk
int trash_init(void *mem, int size, int flags)
void mtrash_fini(void *mem, int size)
void mtrash_dtor(void *mem, int size, void *arg)
int trash_ctor(void *mem, int size, void *arg, int flags)
int mtrash_init(void *mem, int size, int flags)