<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
> From: andy@slimdevices.com<br>> To: giac2000@hotmail.com<br>> Subject: Re: [Tremor] [Patch] Fix crash on large comments on low memory targets<br>> Date: Fri, 3 Jul 2009 00:00:05 -0400<br>> <br>> <br>> On Jul 2, 2009, at 11:45 PM, Mike Giacomelli wrote:<br>> <br>> ><br>> > > Hi, how does this patch handle the fact that the large comment is<br>> > > still fully buffered by the Ogg page code? When I fixed this issue<br>> > > [1] I had to use a much more complex method to avoid using all the<br>> > > extra memory in the Ogg page reading code. I don't see any of that <br>> > in<br>> > > your patch, so I assume all the large pages containing comments will<br>> > > still be read into memory?<br>> > ><br>> > > [1] http://lists.xiph.org/pipermail/tremor/2009-January/001554.html<br>> ><br>> > You mean that it will still be copied from storage into memory <br>> > during buffering? This seems harmless enough to me given that it'll <br>> > be promptly overwritten the next time the system rebuffers.<br>> ><br>> > Or do I misunderstand you?<br>> <br>> Right, the Ogg page buffering code fully buffers the entire comment <br>> (potentially up to 4GB!) into memory before it gets to the vorbis <br>> comment code.<br>><br><br>In rockbox this has not been an issue, since we run on mostly hard disk based players, and can only read the disk for a few seconds during each buffering period. Therefore we buffer ahead however many MB of RAM we have in our system and decode until we run out of buffer. Ogg files are then read out of our own buffering system and decoded by Tremor after the disk has already spun down. If you make the codec not request bytes it doesnt need it makes little difference, since we have already loaded the memory and powered down our disk or flash memory.<br><br>My goal was to make the decoder not crash on files that exhausted our tiny malloc buffer. But if you've got a fix that does this and helps people who haven't written their own buffering code, that would be nice too. Why hasn't it been committed?<br><br /><hr />Windows Live™: Keep your life in sync. <a href='http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009' target='_new'>Check it out.</a></body>
</html>