#include #include static struct vm_cache msg_cache = { .c_name = "msg", .c_obj_size = sizeof(struct msg), }; void msg_init(void) { vm_cache_init(&msg_cache); } struct msg *msg_alloc(void) { return vm_cache_alloc(&msg_cache, VM_NORMAL); } void msg_free(struct msg *msg) { vm_cache_free(&msg_cache, msg); }