String8 Asset::getAssetAllocations() { AutoMutex _l(gAssetLock); String8 res; Asset* cur = gHead; while (cur != NULL) { if (cur->isAllocated()) { res.append(" "); res.append(cur->getAssetSource()); off64_t size = (cur->getLength()+512)/1024; char buf[64]; snprintf(buf, sizeof(buf), ": %dK\n", (int)size); res.append(buf); } cur = cur->mNext; } return res; }