Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
5ee623e
)
svm: calc base address on AArch64 based on autodetected VA space size
49/10049/2
author
Gabriel Ganne
<gabriel.ganne@enea.com>
Wed, 10 Jan 2018 10:40:50 +0000
(11:40 +0100)
committer
Damjan Marion
<dmarion.lists@gmail.com>
Wed, 10 Jan 2018 18:07:46 +0000
(18:07 +0000)
fix proposal for
aec8f8984771cabc79a8ed64f56afcf61465d00a
* fix 0/1 bit count
* fix memory leak
Change-Id: I488229917c463be10b8a5a1b0a3d7723f05061d0
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
src/svm/svm.c
patch
|
blob
|
history
diff --git
a/src/svm/svm.c
b/src/svm/svm.c
index
f187fbf
..
2cbc0d7
100644
(file)
--- a/
src/svm/svm.c
+++ b/
src/svm/svm.c
@@
-79,16
+79,15
@@
svm_get_global_region_base_va ()
unformat (&input, "%llx-%llx", &start, &end);
unformat_skip_line (&input);
}
+ unformat_free (&input);
+ close (fd);
count_leading_zeros (bits, end);
- bits = 64 -
bits
;
+ bits = 64 -
(bits + 1)
;
if (bits >= 36 && bits <= 48)
return ((1ul << bits) / 4) - (2 * SVM_GLOBAL_REGION_SIZE);
else
clib_unix_error ("unexpected va bits '%u'", bits);
-
- unformat_free (&input);
- close (fd);
#endif
/* default value */