[Vm-dev] [Fwd: Image file loading]

John M McIntosh johnmci at smalltalkconsulting.com
Thu Jan 21 03:19:38 UTC 2010


Yes ram, Igor see the copy of the pdf I sent you.  I found that paging in 6 more MB takes 3 or so seconds. 
I don't have an exact number but the other thing that happens is that on  the iphone things like 
the browser and email, phone services, itunes might get terminated in order to find free ram pages 
for the app to use. 

It's very much like the 70's where pages are not free and paging in a page usually means a page has 
to go out.   Pages that can go out are determined by  the VM.  On the iphone this is code, mmap files that are private read/write to writable space. 

Technically I could for example copy the image from read/only directory to temp read/write, then mmap  as private read/write then the file node 
Virtual memory manager would technically allow page in/out of the file.    However the cost for doing this at startup is expensive since you have to 
make a copy of the read/only file.  You can' t use a read/write image because at any point the file won't reflect the proper state since pages will be in memory
as read, or as read/altered but not written to store. And aborting the app would mess things up. PS Not sure if you could flush the file on the the terminate. 
Obviously one could experiment and see. 



On 2010-01-20, at 2:28 PM, Igor Stasenko wrote:

> 
> 2010/1/21 Andreas Raab <andreas.raab at gmx.de>:
>> 
>> Igor Stasenko wrote:
>>> 
>>> Why one should wait , downloading the whole image, only after that to
>>> discover that image format is not compatible
>>> with interpreter, or not enough memory etc etc?
>> 
>> Because your use case is purely hypothetical. You are talking about this as
>> if it was the most common thing to run incompatible images over slow network
>> connections. But it's not. The use case you're describing simply doesn't
>> exist and won't for any foreseeable time.
>> 
>> I'm more than willing to revisit this issue once we have a *some* evidence
>> that this is an actual issue but up until that point let's avoid solving
>> problems we don't actually have.
>> 
> 
> Reading a 10Mb file from flash takes more that 1 second.
> Reading 64bytes(header) from flash stick, takes much less time. Same
> for networked mounted drive etc etc.
> Take in account a failures, like broken image file, or supplying wrong
> file etc etc.
> While all of it is obscure cases, it should be handled effectively.
> 
> Also, i'm not a fan of burning CPU cycles & system resources in
> advance, if there's a possibility for shortcut.
> I am sympathizing a green-life movement ;)
> 
> 
>> Cheers,
>>  - Andreas
>> 
> 
> 
> 
> -- 
> Best regards,
> Igor Stasenko AKA sig.

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================






More information about the Vm-dev mailing list