-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
Currently, the API of SimpleMemoryUsageTracker is such that the call to add() must be followed by a call to withinMemoryLimit() to see if we should hit an assertion that we have used too much memory. We should consider a different API where the call to add() throws if we would exceed the _maxAllowedMemoryUsageBytes by performing this add().
Maybe this should also be applied to the MemoryUsageTracker class as well?