staging: zsmalloc: add details to zs_map_object boiler plate
[deliverable/linux.git] / drivers / staging / zsmalloc / zsmalloc.h
CommitLineData
61989a80
NG
1/*
2 * zsmalloc memory allocator
3 *
4 * Copyright (C) 2011 Nitin Gupta
5 *
6 * This code is released using a dual license strategy: BSD/GPL
7 * You can choose the license that better fits your requirements.
8 *
9 * Released under the terms of 3-clause BSD License
10 * Released under the terms of GNU General Public License Version 2.0
11 */
12
13#ifndef _ZS_MALLOC_H_
14#define _ZS_MALLOC_H_
15
16#include <linux/types.h>
17
18struct zs_pool;
19
20struct zs_pool *zs_create_pool(const char *name, gfp_t flags);
21void zs_destroy_pool(struct zs_pool *pool);
22
c2344348
MK
23unsigned long zs_malloc(struct zs_pool *pool, size_t size);
24void zs_free(struct zs_pool *pool, unsigned long obj);
61989a80 25
c2344348
MK
26void *zs_map_object(struct zs_pool *pool, unsigned long handle);
27void zs_unmap_object(struct zs_pool *pool, unsigned long handle);
61989a80
NG
28
29u64 zs_get_total_size_bytes(struct zs_pool *pool);
30
31#endif
This page took 0.068401 seconds and 5 git commands to generate.