MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mtrash_dtor

Function mtrash_dtor

freebsd/vm/uma_dbg.c:174–190  ·  view source on GitHub ↗

* Fills an item with predictable garbage * * Complies with standard dtor arg/return * */

Source from the content-addressed store, hash-verified

172 *
173 */
174void
175mtrash_dtor(void *mem, int size, void *arg)
176{
177 int cnt;
178 uint32_t *p;
179
180#ifdef DEBUG_MEMGUARD
181 if (is_memguard_addr(mem))
182 return;
183#endif
184
185 size -= sizeof(struct malloc_type *);
186 cnt = size / sizeof(uma_junk);
187
188 for (p = mem; cnt > 0; cnt--, p++)
189 *p = uma_junk;
190}
191
192/*
193 * Fills an item with predictable garbage

Callers 1

mtrash_initFunction · 0.85

Calls 1

is_memguard_addrFunction · 0.85

Tested by

no test coverage detected