2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved. 2N/A * umem memory allocator: implementation-private data structures 2N/A * Internal flags for umem_cache_create 2N/A * Redzone size encodings for umem_alloc() / umem_free(). We encode the 2N/A * allocation size, rather than storing it directly, so that umem_free() 2N/A * can distinguish frees of the wrong size from redzone violations. 2N/A * The bufctl (buffer control) structure keeps some minimal information 2N/A * about each buffer: its address, its slab, and its current linkage, 2N/A * which is either on the slab's freelist (if the buffer is free), or 2N/A * on the cache's buf-to-bufctl hash table (if the buffer is allocated). 2N/A * In the case of non-hashed, or "raw", caches (the common case), only 2N/A * the freelist linkage is necessary: the buffer address is at a fixed 2N/A * offset from the bufctl address, and the slab is at the end of the page. 2N/A * NOTE: bc_next must be the first field; raw buffers have linkage only. 2N/A * The UMF_AUDIT version of the bufctl structure. The beginning of this 2N/A * structure must be identical to the normal bufctl structure so that 2N/A * pointers are interchangeable. 2N/A * umem_bufctl_audits must be allocated from a UMC_NOHASH cache, so we 2N/A * require that 2 of them, plus 2 buftags, plus a umem_slab_t, all fit on 2N/A * For ILP32, this is about 1000 frames. 2N/A * For LP64, this is about 490 frames. 2N/A * A umem_buftag structure is appended to each buffer whenever any of the 2N/A * UMF_BUFTAG flags (UMF_DEADBEEF, UMF_REDZONE, UMF_VERIFY) are set. 2N/A * The magazine types for fast per-cpu allocation 2N/A 2 *
sizeof (
uint_t) -
2 *
sizeof (
void *) -
4 *
sizeof (
int))
2N/A * The magazine lists used in the depot. 2N/A * For 64 bits, buffers >= 16 bytes must be 16-byte aligned 2N/A#
endif /* _UMEM_IMPL_H */