1139825Simp/*- 2148078Srwatson * Copyright (c) 2002, 2003, 2004, 2005 Jeffrey Roberson <jeff@FreeBSD.org> 3148078Srwatson * Copyright (c) 2004, 2005 Bosko Milekic <bmilekic@FreeBSD.org> 4148078Srwatson * All rights reserved. 595771Sjeff * 695771Sjeff * Redistribution and use in source and binary forms, with or without 795771Sjeff * modification, are permitted provided that the following conditions 895771Sjeff * are met: 995771Sjeff * 1. Redistributions of source code must retain the above copyright 1095771Sjeff * notice unmodified, this list of conditions, and the following 1195771Sjeff * disclaimer. 1295771Sjeff * 2. Redistributions in binary form must reproduce the above copyright 1395771Sjeff * notice, this list of conditions and the following disclaimer in the 1495771Sjeff * documentation and/or other materials provided with the distribution. 1595771Sjeff * 1695771Sjeff * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1795771Sjeff * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1895771Sjeff * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1995771Sjeff * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2095771Sjeff * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2195771Sjeff * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2295771Sjeff * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2395771Sjeff * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2495771Sjeff * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2595771Sjeff * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2695771Sjeff * 2795771Sjeff * $FreeBSD$ 2895771Sjeff * 2995771Sjeff */ 3095771Sjeff 3195771Sjeff/* 3295771Sjeff * 3395771Sjeff * This file includes definitions, structures, prototypes, and inlines used 3495771Sjeff * when debugging users of the UMA interface. 3595771Sjeff * 3695771Sjeff */ 3795771Sjeff 3895771Sjeff#ifndef VM_UMA_DBG_H 3995771Sjeff#define VM_UMA_DBG_H 4095771Sjeff 41132987Sgreenint trash_ctor(void *mem, int size, void *arg, int flags); 4295771Sjeffvoid trash_dtor(void *mem, int size, void *arg); 43132987Sgreenint trash_init(void *mem, int size, int flags); 4495771Sjeffvoid trash_fini(void *mem, int size); 4595931Sjeff 4695931Sjeff/* For use only by malloc */ 47132987Sgreenint mtrash_ctor(void *mem, int size, void *arg, int flags); 4895931Sjeffvoid mtrash_dtor(void *mem, int size, void *arg); 49132987Sgreenint mtrash_init(void *mem, int size, int flags); 5095931Sjeffvoid mtrash_fini(void *mem, int size); 5195931Sjeff 5295899Sjeffvoid uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item); 5395899Sjeffvoid uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item); 5495771Sjeff 5595771Sjeff#endif /* VM_UMA_DBG_H */ 56