slab.h (271127) | slab.h (282513) |
---|---|
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, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 26 unchanged lines hidden (view full) --- 35#include <vm/uma.h> 36 37#include <linux/types.h> 38#include <linux/gfp.h> 39 40MALLOC_DECLARE(M_KMALLOC); 41 42#define kmalloc(size, flags) malloc((size), M_KMALLOC, (flags)) | 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, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 26 unchanged lines hidden (view full) --- 35#include <vm/uma.h> 36 37#include <linux/types.h> 38#include <linux/gfp.h> 39 40MALLOC_DECLARE(M_KMALLOC); 41 42#define kmalloc(size, flags) malloc((size), M_KMALLOC, (flags)) |
43#define kvmalloc(size) kmalloc((size), 0) |
|
43#define kzalloc(size, flags) kmalloc((size), (flags) | M_ZERO) 44#define kzalloc_node(size, flags, node) kzalloc(size, flags) 45#define kfree(ptr) free(__DECONST(void *, (ptr)), M_KMALLOC) 46#define krealloc(ptr, size, flags) realloc((ptr), (size), M_KMALLOC, (flags)) 47#define kcalloc(n, size, flags) kmalloc((n) * (size), flags | M_ZERO) 48#define vzalloc(size) kzalloc(size, GFP_KERNEL | __GFP_NOWARN) 49#define vfree(arg) kfree(arg) | 44#define kzalloc(size, flags) kmalloc((size), (flags) | M_ZERO) 45#define kzalloc_node(size, flags, node) kzalloc(size, flags) 46#define kfree(ptr) free(__DECONST(void *, (ptr)), M_KMALLOC) 47#define krealloc(ptr, size, flags) realloc((ptr), (size), M_KMALLOC, (flags)) 48#define kcalloc(n, size, flags) kmalloc((n) * (size), flags | M_ZERO) 49#define vzalloc(size) kzalloc(size, GFP_KERNEL | __GFP_NOWARN) 50#define vfree(arg) kfree(arg) |
51#define kvfree(arg) kfree(arg) |
|
50#define vmalloc(size) kmalloc(size, GFP_KERNEL) 51#define vmalloc_node(size, node) kmalloc(size, GFP_KERNEL) 52 53struct kmem_cache { 54 uma_zone_t cache_zone; 55 void (*cache_ctor)(void *); 56}; 57 --- 51 unchanged lines hidden --- | 52#define vmalloc(size) kmalloc(size, GFP_KERNEL) 53#define vmalloc_node(size, node) kmalloc(size, GFP_KERNEL) 54 55struct kmem_cache { 56 uma_zone_t cache_zone; 57 void (*cache_ctor)(void *); 58}; 59 --- 51 unchanged lines hidden --- |