diff --git a/memory.c b/memory.c index b8a9eb65..f40646e6 100644 --- a/memory.c +++ b/memory.c @@ -4,8 +4,7 @@ * Copyright 2014 Lucas Jones * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee - * Copyright 2016-2017 XMRig - * + * Copyright 2016-2018 XMRig * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +30,8 @@ static size_t offset = 0; void * persistent_calloc(size_t num, size_t size) { + size += size % 16; + void *mem = &persistent_memory[offset]; offset += (num * size);