iotest slightly fixed [#CONV-5680].

This commit is contained in:
Michael Kolupaev 2012-10-03 10:11:12 +00:00
parent b75d9bcc21
commit bb98220c44

View File

@ -45,8 +45,9 @@ struct AlignedBuffer
AlignedBuffer(int size_)
{
size_t page = sysconf(_SC_PAGESIZE);
size = size_;
data = static_cast<char*>(memalign(size, size));
data = static_cast<char*>(memalign(page, (size + page - 1) / page * page));
if (!data)
throwFromErrno("memalign failed");
}