fix proposal for
aec8f8984771cabc79a8ed64f56afcf61465d00a
* fix 0/1 bit count
* fix memory leak
Change-Id: I488229917c463be10b8a5a1b0a3d7723f05061d0
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
unformat (&input, "%llx-%llx", &start, &end);
unformat_skip_line (&input);
}
unformat (&input, "%llx-%llx", &start, &end);
unformat_skip_line (&input);
}
+ unformat_free (&input);
+ close (fd);
count_leading_zeros (bits, end);
count_leading_zeros (bits, end);
+ 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);
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 */
#endif
/* default value */