slab.h (ebe5cf355dca1d7827a70b99a9d9c4f97f78691d) slab.h (abcac97f8202d91b61ae4846794ba60166a56cfe)
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013-2021 Mellanox Technologies, Ltd.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 184 unchanged lines hidden (view full) ---

193}
194
195static inline void
196kfree(const void *ptr)
197{
198 free(__DECONST(void *, ptr), M_KMALLOC);
199}
200
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013-2021 Mellanox Technologies, Ltd.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 184 unchanged lines hidden (view full) ---

193}
194
195static inline void
196kfree(const void *ptr)
197{
198 free(__DECONST(void *, ptr), M_KMALLOC);
199}
200
201static __inline void
202kfree_sensitive(const void *ptr)
203{
204 zfree(__DECONST(void *, ptr), M_KMALLOC);
205}
206
201static inline size_t
202ksize(const void *ptr)
203{
204 return (malloc_usable_size(ptr));
205}
206
207extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name,
208 size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor);

--- 30 unchanged lines hidden ---
207static inline size_t
208ksize(const void *ptr)
209{
210 return (malloc_usable_size(ptr));
211}
212
213extern struct linux_kmem_cache *linux_kmem_cache_create(const char *name,
214 size_t size, size_t align, unsigned flags, linux_kmem_ctor_t *ctor);

--- 30 unchanged lines hidden ---