buffer: throw assertion when posix_memalign allocations fail

This commit is contained in:
Sage Weil 2008-04-09 11:18:45 -07:00
parent 902ac7e40e
commit 45469042b4

View File

@ -131,8 +131,10 @@ private:
#ifdef DARWIN
data = (char *) valloc (len);
#else
data = 0;
::posix_memalign((void**)(void*)&data, PAGE_SIZE, len);
#endif /* DARWIN */
assert(data);
inc_total_alloc(len);
}
~raw_posix_aligned() {