Extract 512 to constants

This commit is contained in:
Vitaliy Filippov
2020-01-06 14:11:47 +03:00
parent f3e3f8f005
commit bf3eecc159
10 changed files with 62 additions and 59 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ blockstore_impl_t::blockstore_impl_t(blockstore_config_t & config, ring_loop_t *
{
throw std::runtime_error("Bad block size");
}
zero_object = (uint8_t*)memalign(DISK_ALIGNMENT, block_size);
zero_object = (uint8_t*)memalign(MEM_ALIGNMENT, block_size);
data_fd = meta_fd = journal.fd = -1;
try
{
@@ -342,7 +342,7 @@ void blockstore_impl_t::process_list(blockstore_op_t *op)
// Allocate memory
op->version = stable_count;
op->retval = total_count;
op->buf = memalign(512, sizeof(obj_ver_id) * total_count);
op->buf = memalign(MEM_ALIGNMENT, sizeof(obj_ver_id) * total_count);
if (!op->buf)
{
op->retval = -ENOMEM;