20 #ifndef _COBALT_POSIX_MEMORY_H 21 #define _COBALT_POSIX_MEMORY_H 23 #include <cobalt/kernel/ppd.h> 25 #define cobalt_umm_set_name(__umm, __fmt, __args...) \ 26 xnheap_set_name(&(__umm)->heap, (__fmt), ## __args) 29 void *cobalt_umm_alloc(
struct cobalt_umm *umm, __u32 size)
35 void cobalt_umm_free(
struct cobalt_umm *umm,
void *p)
41 __u32 cobalt_umm_offset(
struct cobalt_umm *umm,
void *p)
43 return p - xnheap_get_membase(&umm->heap);
46 int cobalt_memdev_init(
void);
48 void cobalt_memdev_cleanup(
void);
50 int cobalt_umm_init(
struct cobalt_umm *umm, u32 size,
51 void (*release)(
struct cobalt_umm *umm));
53 void cobalt_umm_destroy(
struct cobalt_umm *umm);
void xnheap_free(struct xnheap *heap, void *block)
Release a block to a memory heap.
Definition: heap.c:492
void * xnheap_alloc(struct xnheap *heap, u32 size)
Allocate a memory block from a memory heap.
Definition: heap.c:406