Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: include/v8-platform.h

Issue 2729413002: NotForReview: Expose the global memory budget (v8 side)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_V8_PLATFORM_H_ 5 #ifndef V8_V8_PLATFORM_H_
6 #define V8_V8_PLATFORM_H_ 6 #define V8_V8_PLATFORM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <memory> 10 #include <memory>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 virtual ~TraceStateObserver() = default; 205 virtual ~TraceStateObserver() = default;
206 virtual void OnTraceEnabled() = 0; 206 virtual void OnTraceEnabled() = 0;
207 virtual void OnTraceDisabled() = 0; 207 virtual void OnTraceDisabled() = 0;
208 }; 208 };
209 209
210 /** Adds tracing state change observer. */ 210 /** Adds tracing state change observer. */
211 virtual void AddTraceStateObserver(TraceStateObserver*) {} 211 virtual void AddTraceStateObserver(TraceStateObserver*) {}
212 212
213 /** Removes tracing state change observer. */ 213 /** Removes tracing state change observer. */
214 virtual void RemoveTraceStateObserver(TraceStateObserver*) {} 214 virtual void RemoveTraceStateObserver(TraceStateObserver*) {}
215
216 /**
217 * Returns true if the system-wide available free memory (referred to as the
218 * global memory budget) can be obtained via GetGlobalMemoryBudget().
219 */
220 virtual bool IsGlobalMemoryBudgetAvailable() { return false; }
221
222 /**
223 * Returns the global memory budget. A nagative value can be returned when
224 * the global memory budget is unknown or the system is under high memory
225 * pressure.
226 */
227 virtual int64_t GetGlobalMemoryBudget() { return -1; }
228
229 /**
230 * TODO(bashi): Tentative. Set an interval to update the global memory budget.
231 */
232 virtual void SetGlobalMemoryBudgetUpdateInterval(uint32_t interval_ms) {}
215 }; 233 };
216 234
217 } // namespace v8 235 } // namespace v8
218 236
219 #endif // V8_V8_PLATFORM_H_ 237 #endif // V8_V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698