Skip to content

Commit

Permalink
Correct calculation of direct memory consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii0lomakin committed Oct 11, 2018
1 parent 28c3939 commit 47ef253
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public OPointer allocate(int size, int align) {
}

ptr = new OPointer(new Pointer(pointer), size);
memoryConsumption.add(size);
} else {
if (!isLinux) {
throw new ODirectMemoryAllocationFailedException("Alignment of pointers is allowed only on Linux platforms.");
Expand All @@ -143,6 +142,7 @@ public OPointer allocate(int size, int align) {
ptr = new OPointer(pointerByReference.getValue(), size);
}

memoryConsumption.add(size);
return track(ptr);
}

Expand Down

0 comments on commit 47ef253

Please sign in to comment.