michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:set ts=2 sw=2 sts=2 ci et: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_AvailableMemoryTracker_h michael@0: #define mozilla_AvailableMemoryTracker_h michael@0: michael@0: namespace mozilla { michael@0: namespace AvailableMemoryTracker { michael@0: michael@0: // The AvailableMemoryTracker launches a memory pressure watcher on all michael@0: // platforms to react to low-memory situations and on Windows it implements michael@0: // the full functionality used to monitor how much memory is available. michael@0: // michael@0: // Init() must be called before any other threads have started, because it michael@0: // modifies the in-memory implementations of some DLL functions in michael@0: // non-thread-safe ways. michael@0: // michael@0: // The hooks don't do anything until Activate() is called. It's an error to michael@0: // call Activate() without first calling Init(). michael@0: michael@0: void Init(); michael@0: void Activate(); michael@0: michael@0: } // namespace AvailableMemoryTracker michael@0: } // namespace mozilla michael@0: michael@0: #endif // ifndef mozilla_AvailableMemoryTracker_h