diff options
author | Nitin Gupta <ngupta@vflare.org> | 2010-06-01 13:31:24 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-18 12:46:42 -0700 |
commit | 16a4bfb9e9dfefbd28ee170fa3e259bc88d81eb5 (patch) | |
tree | fc8cdc97f97b699c7ed0e0a08eacd5a3b1f3058f /drivers/staging/zram/xvmalloc.h | |
parent | a1dd52afa94238d361d70502b219409ea115e235 (diff) |
Staging: Rename ramzswap files to zram
Related changes:
- Modify revelant Kconfig and Makefile accordingly.
- Change include filenames in code.
- Remove dependency on CONFIG_SWAP in Kconfig as zram usage
is no longer limited to swap disks.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/zram/xvmalloc.h')
-rw-r--r-- | drivers/staging/zram/xvmalloc.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/staging/zram/xvmalloc.h b/drivers/staging/zram/xvmalloc.h new file mode 100644 index 00000000000..5b1a81aa5fa --- /dev/null +++ b/drivers/staging/zram/xvmalloc.h @@ -0,0 +1,30 @@ +/* + * xvmalloc memory allocator + * + * Copyright (C) 2008, 2009, 2010 Nitin Gupta + * + * This code is released using a dual license strategy: BSD/GPL + * You can choose the licence that better fits your requirements. + * + * Released under the terms of 3-clause BSD License + * Released under the terms of GNU General Public License Version 2.0 + */ + +#ifndef _XV_MALLOC_H_ +#define _XV_MALLOC_H_ + +#include <linux/types.h> + +struct xv_pool; + +struct xv_pool *xv_create_pool(void); +void xv_destroy_pool(struct xv_pool *pool); + +int xv_malloc(struct xv_pool *pool, u32 size, struct page **page, + u32 *offset, gfp_t flags); +void xv_free(struct xv_pool *pool, struct page *page, u32 offset); + +u32 xv_get_object_size(void *obj); +u64 xv_get_total_size_bytes(struct xv_pool *pool); + +#endif |