Commit 9e68f687 authored by Nicolas Denoyelle's avatar Nicolas Denoyelle
Browse files

fix munmap

parent bdf8c235
Pipeline #13314 passed with stages
in 6 minutes and 20 seconds
......@@ -459,7 +459,7 @@ static ssize_t mapper_munmap_recursive(struct aml_mapper *mapper,
// If this structure was not split, then return size of it
// non-split children.
return mapper->size + s;
return mapper->size * num + s;
}
ssize_t aml_mapper_munmap(struct aml_mapper *mapper,
......@@ -477,7 +477,8 @@ ssize_t aml_mapper_munmap(struct aml_mapper *mapper,
return s;
if (mapper->flags & AML_MAPPER_FLAG_SHALLOW)
aml_area_munmap(area, PTR_OFF(ptr, +, mapper->offsets[0]), s);
aml_area_munmap(area, PTR_OFF(ptr, +, mapper->offsets[0]),
s - num * mapper->size);
else
aml_area_munmap(area, ptr, s);
return AML_SUCCESS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment