1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_mozalloc_oom_h
9 #define mozilla_mozalloc_oom_h
14 * Called when memory is critically low. Returns iff it was able to
15 * remedy the critical memory situation; if not, it will abort().
17 MFBT_API
void mozalloc_handle_oom(size_t requestedSize
);
19 extern MFBT_DATA
size_t gOOMAllocationSize
;
21 /* TODO: functions to query system memory usage and register
22 * critical-memory handlers. */
24 #endif /* ifndef mozilla_mozalloc_oom_h */