Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304557
b: refs/heads/master
c: 00a61d8
h: refs/heads/master
i:
  304555: 20381d6
v: v3
  • Loading branch information
Minchan Kim authored and Greg Kroah-Hartman committed May 9, 2012
1 parent 76559d6 commit 4b9ff91
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e3b61547191a5934ff6c789aaa4d7e9a9e52f5a
refs/heads/master: 00a61d8618bb7314113eb3ba27c12631cd85c298
17 changes: 11 additions & 6 deletions trunk/drivers/staging/zsmalloc/zsmalloc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,9 @@ EXPORT_SYMBOL_GPL(zs_destroy_pool);
* zs_malloc - Allocate block of given size from pool.
* @pool: pool to allocate from
* @size: size of block to allocate
* @page: page no. that holds the object
* @offset: location of object within page
*
* On success, <page, offset> identifies block allocated
* and 0 is returned. On failure, <page, offset> is set to
* 0 and -ENOMEM is returned.
*
* On success, handle to the allocated object is returned,
* otherwise NULL.
* Allocation requests with size > ZS_MAX_ALLOC_SIZE will fail.
*/
void *zs_malloc(struct zs_pool *pool, size_t size)
Expand Down Expand Up @@ -667,6 +663,15 @@ void zs_free(struct zs_pool *pool, void *obj)
}
EXPORT_SYMBOL_GPL(zs_free);

/**
* zs_map_object - get address of allocated object from handle.
* @pool: pool from which the object was allocated
* @handle: handle returned from zs_malloc
*
* Before using an object allocated from zs_malloc, it must be mapped using
* this function. When done with the object, it must be unmapped using
* zs_unmap_object
*/
void *zs_map_object(struct zs_pool *pool, void *handle)
{
struct page *page;
Expand Down

0 comments on commit 4b9ff91

Please sign in to comment.