From 8f38a4b3fa25918480a2daaee532f3280f56ba77 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 24 Mar 2009 13:13:52 -0700 Subject: [PATCH] buffer: check posix_memalign result code --- src/include/buffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/buffer.h b/src/include/buffer.h index 494c5b792f73f..a080f8239ed43 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -161,7 +161,8 @@ private: data = (char *) valloc (len); #else data = 0; - ::posix_memalign((void**)(void*)&data, PAGE_SIZE, len); + int r = ::posix_memalign((void**)(void*)&data, PAGE_SIZE, len); + assert(r == 0); #endif /* DARWIN */ assert(data); inc_total_alloc(len); -- 2.39.5