1
0
Fork 0
forked from len0rd/rockbox

buflib: Properly support allocations without any name, to avoid wasting space

in micro-allocation scenarios.

Change-Id: I97a065bcfba8e0fda9b1670445e839e267c769c8
This commit is contained in:
Thomas Martitz 2014-02-02 14:43:45 +01:00
parent d66346789c
commit 4ce1deacfd
4 changed files with 27 additions and 22 deletions

View file

@ -303,12 +303,14 @@ void buflib_buffer_in(struct buflib_context *ctx, int size);
/* debugging */
/**
* Returns the name, as given to core_alloc() and core_allloc_ex(), of the
* allocation associated with the given handle
* Returns the name, as given to buflib_alloc() and buflib_allloc_ex(), of the
* allocation associated with the given handle. As naming allocations
* is optional, there might be no name associated.
*
* handle: The handle indicating the allocation
*
* Returns: A pointer to the string identifier of the allocation
* Returns: A pointer to the string identifier of the allocation, or NULL
* if none was specified with buflib_alloc_ex/(.
*/
const char* buflib_get_name(struct buflib_context *ctx, int handle);