typedef struct {
/* The mspace to allocate from.
*/
- mspace *msp;
+ mspace msp;
/* The bitmap that keeps track of where objects are in the heap.
*/
static HeapSource *gHs = NULL;
-static mspace *
+static mspace
createMspace(size_t startSize, size_t absoluteMaxSize, size_t id)
{
- mspace *msp;
+ mspace msp;
char name[PATH_MAX];
/* If two ashmem regions have the same name, only one gets
}
static bool
-addNewHeap(HeapSource *hs, mspace *msp, size_t mspAbsoluteMaxSize)
+addNewHeap(HeapSource *hs, mspace msp, size_t mspAbsoluteMaxSize)
{
Heap heap;
/* Don't let the soon-to-be-old heap grow any further.
*/
if (hs->numHeaps > 0) {
- mspace *msp = hs->heaps[0].msp;
+ mspace msp = hs->heaps[0].msp;
mspace_set_max_allowed_footprint(msp, mspace_footprint(msp));
}
* max_allowed, because the heap may not have grown all the
* way to the allowed size yet.
*/
- mspace *msp = hs->heaps[0].msp;
+ mspace msp = hs->heaps[0].msp;
size_t currentHeapSize = mspace_footprint(msp);
if (softLimit < currentHeapSize) {
/* Don't let the heap grow any more, and impose a soft limit.
HeapSource *hs = gHs;
#if DEBUG_HEAP_SOURCE
HeapSource oldHs = *hs;
- mspace *msp = hs->heaps[0].msp;
+ mspace msp = hs->heaps[0].msp;
size_t oldAllowedFootprint =
mspace_max_allowed_footprint(msp);
#endif