objective c - Virtual and Real memory in IOS app -
does amount of memory app take physically, in, on hard drive, have relationship amount of memory takes when running? instance, say, background.caf file takes 4.9 megabytes of space on disk, when being run on iphone, 4.9 megabytes being allocated music? similarly, if graphics take 20 megabytes of space, amount of memory on iphone, being used store , access these graphics equivalent 20 megabytes? important because want know if size of files i'm working right now, have large impact on performance. thank you!
does amount of memory app take physically, in, on hard drive, have relationship amount of memory takes when running?
no, absolutely not. otherwise autodesk go out of business!
when being run on iphone, 4.9 megabytes being allocated music?
no, music not loaded memory @ once, sent in chunks, streams, or decompressed in real time, never whole thing present in memory.
similarly, if graphics take 20 megabytes of space, amount of memory on iphone, being used store , access these graphics equivalent 20 megabytes
it depends. uiimages loaded on demand , cached depending on method called (e.g. +imagenamed: cached, , +imagewithcontentsoffile: not), however, png resources occupy more memory file size because xcode runs series of optimizations , compressions before loaded bundle. caching image increase overall memory footprint slightly, however, leads faster image loading uiimage doesn't have seek out on disk again.
and again changes jpeg images, have famous file-format specific lossy compression mechanism, allowing them smaller on disk, massive in memory.
Comments
Post a Comment