1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix block size calculation for memory pool

This commit is contained in:
Steffen Vogel 2016-10-30 23:00:17 -04:00
parent 248a6638da
commit 287e5727fb

View file

@ -18,7 +18,7 @@ int pool_init(struct pool *p, size_t cnt, size_t blocksz, const struct memtype *
/* Make sure that we use a block size that is aligned to the size of a cache line */
p->alignment = kernel_get_cacheline_size();
p->blocksz = blocksz * CEIL(blocksz, p->alignment);
p->blocksz = p->alignment * CEIL(blocksz, p->alignment);
p->len = cnt * p->blocksz;
p->mem = m;