diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2018-12-19 15:15:32 +0800 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2018-12-24 11:29:15 +0800 |
commit | aca1bb4f8b4f6e17417e5b8e61a09991ae4cc923 (patch) | |
tree | 6d4edbb90e1e554391f5a79135e4b957ba42626c | |
parent | 421cf7db2b44ac9eb508840bcbfbb6076c8d90a6 (diff) | |
download | vm-scalability-aca1bb4f8b4f6e17417e5b8e61a09991ae4cc923.tar.gz |
usemem: warn on invalid option combinations
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rw-r--r-- | usemem.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -993,6 +993,18 @@ int main(int argc, char *argv[]) } } + if (opt_malloc) { + if (map_populate|map_anonymous|map_hugetlb) + fprintf(stderr, + "%s: mmap options ignored for malloc()\n", + ourname); + } else { + if (map_hugetlb && !map_anonymous) + fprintf(stderr, + "%s: MAP_HUGETLB relies on MAP_ANONYMOUS\n", + ourname); + } + if (pipe(start_ready_fds) || pipe(start_wake_fds) || pipe(free_ready_fds) || pipe(free_wake_fds)) { fprintf(stderr, "%s: failed to create pipes: %s\n", |