diff -r 56016468753d -r 8ccdde37275b ui/common/context.c --- a/ui/common/context.c Thu May 15 15:53:29 2014 +0200 +++ b/ui/common/context.c Thu May 15 17:17:58 2014 +0200 @@ -351,3 +351,21 @@ ctx->group_widgets, gw); } + +void* ui_malloc(UiContext *ctx, size_t size) { + return ctx ? ucx_mempool_malloc(ctx->mempool, size) : NULL; +} + +void* ui_calloc(UiContext *ctx, size_t nelem, size_t elsize) { + return ctx ? ucx_mempool_calloc(ctx->mempool, nelem, elsize) : NULL; +} + +void ui_free(UiContext *ctx, void *ptr) { + if(ctx) { + ucx_mempool_free(ctx->mempool, ptr); + } +} + +void* ui_realloc(UiContext *ctx, void *ptr, size_t size) { + return ctx ? ucx_mempool_realloc(ctx->mempool, ptr, size) : NULL; +} \ No newline at end of file