summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/cache_util_posix.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 15:32:03 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-17 15:32:03 +0000
commitb4f71a8d7e0186a717354e1064a23d5159950846 (patch)
treeb82db787c0a34feb598c802a56730a37a2641e7d /net/disk_cache/cache_util_posix.cc
parentdef7fce451d9f70ffa602d6e38524cb8ecc8adfa (diff)
downloadchromium_src-b4f71a8d7e0186a717354e1064a23d5159950846.zip
chromium_src-b4f71a8d7e0186a717354e1064a23d5159950846.tar.gz
chromium_src-b4f71a8d7e0186a717354e1064a23d5159950846.tar.bz2
Revision 2303 introduced AmountOfPhysicalMemory in SysInfo, so now GetSystemMemory in net/disk_cache/cache_util is redundant.
Patch from Pawel Hajdan Jr. Review URL: http://codereview.chromium.org/3103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/cache_util_posix.cc')
-rw-r--r--net/disk_cache/cache_util_posix.cc29
1 files changed, 0 insertions, 29 deletions
diff --git a/net/disk_cache/cache_util_posix.cc b/net/disk_cache/cache_util_posix.cc
index c912e2b..6928187 100644
--- a/net/disk_cache/cache_util_posix.cc
+++ b/net/disk_cache/cache_util_posix.cc
@@ -27,35 +27,6 @@ int64 GetFreeDiskSpace(const std::wstring& path) {
return static_cast<int64>(stats.f_bavail) * stats.f_frsize;
}
-int64 GetSystemMemory() {
-#if defined(OS_LINUX)
- // _SC_PHYS_PAGES is not part of POSIX and not available on OS X
- long pages = sysconf(_SC_PHYS_PAGES);
- if (pages == -1) {
- return -1;
- }
- long page_size = sysconf(_SC_PAGE_SIZE);
- if (page_size == -1) {
- return -1;
- }
- int64 result = static_cast<int64>(pages) * page_size;
- DCHECK(result > 0);
- return result;
-#elif defined(OS_MACOSX)
- struct host_basic_info hostinfo;
- mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
- int result = host_info(mach_host_self(),
- HOST_BASIC_INFO,
- reinterpret_cast<host_info_t>(&hostinfo),
- &count);
- DCHECK_EQ(HOST_BASIC_INFO_COUNT, count);
- return (result == KERN_SUCCESS) ? hostinfo.max_mem : -1;
-#else
- NOTIMPLEMENTED();
- return -1;
-#endif
-}
-
bool MoveCache(const std::wstring& from_path, const std::wstring& to_path) {
// Just use the version from base.
return file_util::Move(from_path.c_str(), to_path.c_str());