From 3d23a61588e0aefc80cda44ed323ea205f24ebbf Mon Sep 17 00:00:00 2001 From: James Dong Date: Thu, 25 Feb 2010 10:06:32 -0800 Subject: [PATCH] Add some space and total memory amount to the memory dump from the media server process. --- media/libmediaplayerservice/MediaPlayerService.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 50dad339128f9..c26d68274e601 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -430,6 +430,8 @@ void memStatus(int fd, const Vector& args) snprintf(buffer, SIZE, " Allocation count %i\n", count); result.append(buffer); + snprintf(buffer, SIZE, " Total memory %i\n", totalMemory); + result.append(buffer); AllocEntry * entries = new AllocEntry[count]; @@ -478,7 +480,7 @@ void memStatus(int fd, const Vector& args) for (size_t i = 0; i < count; i++) { AllocEntry *e = &entries[i]; - snprintf(buffer, SIZE, "size %8i, dup %4i", e->size, e->dups); + snprintf(buffer, SIZE, "size %8i, dup %4i, ", e->size, e->dups); result.append(buffer); for (size_t ct = 0; (ct < backtraceSize) && e->backtrace[ct]; ct++) { if (ct) {