Fix misaligned access.

This commit is contained in:
XMRig 2018-10-04 20:11:47 +03:00
parent 0bba8849f0
commit bf2eb1a685

View File

@ -4,8 +4,7 @@
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2016-2017 XMRig <support@xmrig.com>
*
* Copyright 2016-2018 XMRig <support@xmrig.com>
*
* 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);