1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #include "nsXPCOMPrivate.h"
12 #include "nsISupportsUtils.h"
15 ////////////////////////////////////////////////////////////////////////////////
16 // nsMemory static helper routines
18 nsresult
nsMemory::HeapMinimize(bool aImmediate
) {
19 nsCOMPtr
<nsIMemory
> mem
;
20 nsresult rv
= NS_GetMemoryManager(getter_AddRefs(mem
));
21 if (NS_WARN_IF(NS_FAILED(rv
))) {
25 return mem
->HeapMinimize(aImmediate
);
28 nsIMemory
* nsMemory::GetGlobalMemoryService() {
30 nsresult rv
= NS_GetMemoryManager(&mem
);
38 //----------------------------------------------------------------------