Skip to content

Commit

Permalink
Fix missed check
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Isaev <[email protected]>
  • Loading branch information
isaevil committed Nov 1, 2021
1 parent ee4045c commit 275c798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tbbmalloc/tbbmalloc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class HugePagesStatus {
// We parse a counter number, it can't be huge
parseFile</*BUFF_SIZE=*/100>("/proc/sys/vm/nr_hugepages", vmItem);

if (hugePageSize < ULLONG_MAX && meminfoHugePagesTotal > 0 || vmHugePagesTotal > 0) {
if (hugePageSize > -1 && (meminfoHugePagesTotal > 0 || vmHugePagesTotal > 0)) {
MALLOC_ASSERT(hugePageSize != 0, "Huge Page size can't be zero if we found preallocated.");

// Any non zero value clearly states that there are preallocated
Expand Down

0 comments on commit 275c798

Please sign in to comment.