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

memory: fix segfault when releasing hugepage memory (closes #171)

This commit is contained in:
Steffen Vogel 2018-07-16 21:16:30 +02:00
parent 4d54af002d
commit 09742179de

View file

@ -70,7 +70,7 @@ static struct memory_allocation * memory_hugepage_alloc(struct memory_type *m, s
ma->alignment = alignment;
ma->type = m;
ma->address = mmap(NULL, len, prot, flags, -1, 0);
ma->address = mmap(NULL, ma->length, prot, flags, -1, 0);
if (ma->address == MAP_FAILED) {
free(ma);
return NULL;