Make the soft limited predicate look more like a predicate.
Change-Id: I8edfafdfa8d73ebe1e3288bc0c8df2c6acbce2af
diff --git a/vm/alloc/HeapSource.c b/vm/alloc/HeapSource.c
index 5127cad..5fa1cc5 100644
--- a/vm/alloc/HeapSource.c
+++ b/vm/alloc/HeapSource.c
@@ -172,8 +172,7 @@
/*
* Returns true iff a soft limit is in effect for the active heap.
*/
-static inline bool
-softLimited(const HeapSource *hs)
+static bool isSoftLimited(const HeapSource *hs)
{
/* softLimit will be either SIZE_MAX or the limit for the
* active mspace. idealSize can be greater than softLimit
@@ -191,7 +190,7 @@
static size_t
getAllocLimit(const HeapSource *hs)
{
- if (softLimited(hs)) {
+ if (isSoftLimited(hs)) {
return hs->softLimit;
} else {
return mspace_max_allowed_footprint(hs2heap(hs)->msp);
@@ -871,7 +870,7 @@
}
oldIdealSize = hs->idealSize;
- if (softLimited(hs)) {
+ if (isSoftLimited(hs)) {
/* We're soft-limited. Try removing the soft limit to
* see if we can allocate without actually growing.
*/
@@ -1313,7 +1312,7 @@
heap->concurrentStartBytes = freeBytes - CONCURRENT_START;
}
newHeapMax = mspace_max_allowed_footprint(heap->msp);
- if (softLimited(hs)) {
+ if (isSoftLimited(hs)) {
LOGD_HEAP("GC old usage %zd.%zd%%; now "
"%zd.%03zdMB used / %zd.%03zdMB soft max "
"(%zd.%03zdMB over, "