mempool: limit max_object_size to page_size / 4

Because of the page_header mempool allocator can put only one half-page
sized object in a page. Page allocator has exactly the same space overhead
but is much simpler (no need for setting up page_header, freeing objects
allocated on another CPU is trivial).

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mempool: replace MALLOC_ALIGNMENT with alignof(max_align_t)

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mempool: set default alignment to min(size, alignof(max_align_t))

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
mempool: don't increase size of arbitrary aligned objects

This is just a rewrite of a conditionals that are responsible for
choosing appropriate allocator for a requested size and alignment.
The allocator is given the object size exactly as requested.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>