View Single Post
Old 01-09-07, 08:20 AM   #1 (permalink)
FrinkTL
Aximsite Minor League
 
FrinkTL's Avatar
Member
 
Join Date: Dec 2006
Location: Nassau, NY
Posts: 200
Device: Motorola i560
Carrier: Sprint Nextel
Thanked 10 Times in 8 Posts
Aximsitex50icon Mobile Media Player 10 Bizzare (and HUGE) Memory Usage

I have noticed some interesting memory behavior of Media Player (beyond the fact that it is a memory [RAM] hog).

I ran a test (Source data below) that seems to confirm that it exhibits a predicible, cyclic memory usage pattern. Can anyone else confirm these findings and, if so, provide some insight into what the heck it's doing and why?

This data was collected while playing 96bit per second MP3 files from a nearly full 512MB SD card. The media player was set to shuffle.

Methodology:
  • Media Player was in Shuffle mode
  • I used the standard Memory Application that comes with the OS to track the amount of free memory to track the amount of memory consumed by the application (with no other applications open).
  • I monitored the Memory application while songs were played and logged the amount of free memory once the number stopped changing.
Conclusions:
1. The first interesting finding is the amount of memory the application consumes in building what I can only assume is its internal playlist. I have to assume this because Media Player no longer (since the last 2 versions) allows user-configured playlists. This assumption is also based upon the difference between the free memory reported immediately after opening the application but before starting playback (26.08MB) and the amount of memory after the first second of playback (7.23MB).
Meaning: I can only think of a couple of possibilities as to a cause for this.
a. One is that it Media Player is building a playlist in memory or
b. it is pre-loading into memory a set number of the next x songs in the playlist.
I'm inclined to think it is NOT the latter, since within 10 seconds of detaching the SD card, Media Player stops playing. The first option isn't all that much more pleasant since it would seem to imply that the playlist isn't being stored in Flash memory but instead is using the much more scarce RAM (problematic when I'm trying to play half a gigabyte of files).
2. The memory is allocated and deallocated in a very predictable pattern. At start, it grabs all but 6-9MB of RAM. Then, as each song play is completed, it releases on average about 3MB of memory (varies according to the MP3 file size). It continues this 4 times, until free memory reaches approximately 20MB. With the start of the 5th song, Media Player drops the free memory amount back down to the single digits and begins repeating the same pattern. The data clearly shows that whatever it is doing, the memory usage pattern is as reliable as addition.
Meaning: I have no idea. Whatever it is doing, it keeps repeating it.
Source Data: (in attached Word doc.)

I look forward to hearing from someone soon. Sorry this is so long and technical, but it kind of has to be...
Attached Files:
__________________
Tim:)
HP iPAQ 211
2GB SanDisk SD
ThinkOutside Sierra Bluetooth Keyboard
Pharos GPS w/ Bluetooth Dock

HP 2133 Mini-Note
1.6GHz VIA, 2GB DDR2 RAM
120GB 7200RPM HDD with Drive Guard
10/100/1000 Ethernet with Bluetooth 2.0
running Windows XP Pro

Kid's Pocket PC (to make homework fun):
Axim X30 (High)
ThinkOutside IR Keyboard

PLUS the following RETIRED (but still functional) devices:
1. Sharp Mobilon 4100
2. iPAQ 3150
FrinkTL is offline   Reply With Quote