Skip to content

Commit

Permalink
staging: zsmalloc: zsmalloc memory allocation library
Browse files Browse the repository at this point in the history
This patch creates a new memory allocation library named
zsmalloc.

NOTE: zsmalloc currently depends on SPARSEMEM for the MAX_PHYSMEM_BITS
value needed to determine the format of the object handle. There may
be a better way to do this.  Feedback is welcome.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Nitin Gupta authored and gregkh committed Feb 9, 2012
1 parent 17dd9f8 commit 61989a8
Show file tree
Hide file tree
Showing 5 changed files with 927 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/staging/zsmalloc/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config ZSMALLOC
tristate "Memory allocator for compressed pages"
depends on SPARSEMEM
default n
help
zsmalloc is a slab-based memory allocator designed to store
compressed RAM pages. zsmalloc uses virtual memory mapping
in order to reduce fragmentation. However, this results in a
non-standard allocator interface where a handle, not a pointer, is
returned by an alloc(). This handle must be mapped in order to
access the allocated space.
3 changes: 3 additions & 0 deletions drivers/staging/zsmalloc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zsmalloc-y := zsmalloc-main.o

obj-$(CONFIG_ZSMALLOC) += zsmalloc.o
Loading

0 comments on commit 61989a8

Please sign in to comment.