* ipc/ipc_kmsg.c (ipc_kmsg_get_from_kernel): Use the ikm cache. (ipc_kmsg_put_to_kernel): Likewis. --- ipc/ipc_kmsg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ipc/ipc_kmsg.c b/ipc/ipc_kmsg.c index e16709c..dfbb3eb 100644 --- a/ipc/ipc_kmsg.c +++ b/ipc/ipc_kmsg.c @@ -546,10 +546,9 @@ ipc_kmsg_get_from_kernel( assert(size >= sizeof(mach_msg_header_t)); assert((size & 3) == 0); - kmsg = ikm_alloc(size); + kmsg = ikm_cache_get (size); if (kmsg == IKM_NULL) return MACH_SEND_NO_BUFFER; - ikm_init(kmsg, size); memcpy(&kmsg->ikm_header, msg, size); @@ -613,7 +612,7 @@ ipc_kmsg_put_to_kernel( memcpy(msg, &kmsg->ikm_header, size); - ikm_free(kmsg); + ikm_cache_put (kmsg); } /* -- 2.1.3