X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fbuddy.h;h=163c5a82ffaf0f218b62c7eb5e5a5b48470b1cb4;hb=devel;hp=34742e1c76d563249dc925a7dc4c49c64f17e3be;hpb=84c84a909e8c3374e2cd7768ef4240ca9d73222f;p=palacios.git diff --git a/linux_module/buddy.h b/linux_module/buddy.h index 34742e1..163c5a8 100644 --- a/linux_module/buddy.h +++ b/linux_module/buddy.h @@ -73,7 +73,8 @@ buddy_init(unsigned long pool_order, unsigned int node_id); extern void -buddy_deinit(struct buddy_memzone * zone); +buddy_deinit(struct buddy_memzone * zone, + int (*free_callback)(void *user_metadata)); /* Add pool at given physical address */ extern int @@ -91,14 +92,17 @@ buddy_remove_pool(struct buddy_memzone * zone, void **user_metadata); + /* Allocate pages, returns physical address */ extern uintptr_t buddy_alloc(struct buddy_memzone * zone, - unsigned long order); + unsigned long order, + int (*filter_func)(void *paddr, void *filter_state), + void *filter_state); /* Free a physical address */ -extern void +extern int buddy_free(struct buddy_memzone * zone, uintptr_t addr, unsigned long order);