aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morecore.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/morecore.c b/morecore.c
index 869fcbd..e120d55 100644
--- a/morecore.c
+++ b/morecore.c
@@ -216,7 +216,7 @@ void hugetlbfs_setup_morecore(void)
if (hpage_size <= 0) {
if (errno == ENOSYS)
WARNING("Hugepages unavailable\n");
- else if (errno == EOVERFLOW)
+ else if (errno == EOVERFLOW || errno == ERANGE)
WARNING("Hugepage size too large\n");
else if (errno == EINVAL)
WARNING("Invalid huge page size\n");
@@ -228,16 +228,6 @@ void hugetlbfs_setup_morecore(void)
return;
}
- if (hpage_size <= 0) {
- if (errno == ENOSYS)
- WARNING("Hugepages unavailable\n");
- else if (errno == EOVERFLOW || errno == ERANGE)
- WARNING("Hugepage size too large\n");
- else
- WARNING("Hugepage size (%s)\n", strerror(errno));
- return;
- }
-
heap_fd = hugetlbfs_unlinked_fd_for_size(hpage_size);
if (heap_fd < 0) {
WARNING("Couldn't open hugetlbfs file for morecore\n");