diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-02-28 14:39:41 -0500 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2019-02-28 15:08:59 -0500 |
commit | b2c7cce6ccdfd0ad54e47fb3ff31c8810fd5f6b7 (patch) | |
tree | 1f92ed6a6fdca0e20529fd018bf527b8caea6935 | |
parent | 8bb32f15e153f037be28a6232a536f3478d4dc0d (diff) | |
download | mongo-b2c7cce6ccdfd0ad54e47fb3ff31c8810fd5f6b7.tar.gz |
SERVER-39863 fix macos,freebsd
-rw-r--r-- | src/mongo/util/processinfo_freebsd.cpp | 2 | ||||
-rw-r--r-- | src/mongo/util/processinfo_osx.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/util/processinfo_freebsd.cpp b/src/mongo/util/processinfo_freebsd.cpp index e485e36dd82..403a61b6880 100644 --- a/src/mongo/util/processinfo_freebsd.cpp +++ b/src/mongo/util/processinfo_freebsd.cpp @@ -177,7 +177,7 @@ bool ProcessInfo::blockInMemory(const void* start) { return x & 0x1; } -bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, vector<char>* out) { +bool ProcessInfo::pagesInMemory(const void* start, size_t numPages, std::vector<char>* out) { out->resize(numPages); // int mincore(const void *addr, size_t len, char *vec); if (mincore(alignToStartOfPage(start), numPages * getPageSize(), &(out->front()))) { diff --git a/src/mongo/util/processinfo_osx.cpp b/src/mongo/util/processinfo_osx.cpp index 4c6e656898e..07ceb5fae73 100644 --- a/src/mongo/util/processinfo_osx.cpp +++ b/src/mongo/util/processinfo_osx.cpp @@ -75,7 +75,7 @@ int ProcessInfo::getVirtualMemorySize() { mach_port_t task; if ((result = task_for_pid(mach_task_self(), _pid.toNative(), &task)) != KERN_SUCCESS) { - cout << "error getting task\n"; + std::cout << "error getting task\n"; return 0; } @@ -86,7 +86,7 @@ int ProcessInfo::getVirtualMemorySize() { #endif mach_msg_type_number_t count = TASK_BASIC_INFO_COUNT; if ((result = task_info(task, TASK_BASIC_INFO, (task_info_t)&ti, &count)) != KERN_SUCCESS) { - cout << "error getting task_info: " << result << endl; + std::cout << "error getting task_info: " << result << std::endl; return 0; } return (int)((double)ti.virtual_size / (1024.0 * 1024)); @@ -98,7 +98,7 @@ int ProcessInfo::getResidentSize() { mach_port_t task; if ((result = task_for_pid(mach_task_self(), _pid.toNative(), &task)) != KERN_SUCCESS) { - cout << "error getting task\n"; + std::cout << "error getting task\n"; return 0; } @@ -110,7 +110,7 @@ int ProcessInfo::getResidentSize() { #endif mach_msg_type_number_t count = TASK_BASIC_INFO_COUNT; if ((result = task_info(task, TASK_BASIC_INFO, (task_info_t)&ti, &count)) != KERN_SUCCESS) { - cout << "error getting task_info: " << result << endl; + std::cout << "error getting task_info: " << result << std::endl; return 0; } return (int)(ti.resident_size / (1024 * 1024)); @@ -126,7 +126,7 @@ void ProcessInfo::getExtraInfo(BSONObjBuilder& info) { if (KERN_SUCCESS != task_info(mach_task_self(), TASK_EVENTS_INFO, (integer_t*)&taskInfo, &taskInfoCount)) { - cout << "error getting extra task_info" << endl; + std::cout << "error getting extra task_info" << std::endl; return; } |