mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
![Dan Magenheimer](/assets/img/avatar_default.png)
RAMster implements peer-to-peer transcendent memory, allowing a "cluster" of kernels to dynamically pool their RAM. Zcache is in the process of converting allocators, from xvmalloc to zsmalloc. Further, RAMster V5 testing to date has been done only with xvmalloc. To avoid merging problems, a linux-3.2 copy of xvmalloc is incorporated by this patch. Later patches will be able to eliminate xvmalloc and use zsmalloc. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30 lines
774 B
C
30 lines
774 B
C
/*
|
|
* 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
|