11- MemoryMgt - Memory Management CSE to Fall 2010...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 5/7/11 Memory Management CSE 390 Fall 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 What’s memory management? In code, developers create and use objects, which takes up space in memory. To make sure their apps run properly, and don’t crash and don’t run out of memory, developers (on some platforms and in some languages) have to explicitly manage the memory used by the objects they create. Some primitive objects, like int’s, float’s, and BOOL’s don’t count… but most others
Background image of page 2
5/7/11 How much RAM do I have? iPhone 3G: 128MB iPhone 3GS, iPod Touch 4, iPad: 256MB iPhone 4: 512MB That isn’t really a lot – after the iOS takes what it needs, the iPhone 3G has about 30MB left to run an app. No swap file (virtual memory) on the
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Garbage collection Garbage collection is the automatic disposal of objects in memory created by the developer, but are no longer in use by the application. C#, Java, JavaScript, and ActionScript have this. Even OS X (10.5 – Cocoa 2.0) has garbage collection, but not the iPhone. C does not have garbage collection
Background image of page 4
5/7/11 Reference counting C and iOS use a method called reference counting instead. Basically it tracks the number of references to an object, or
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

11- MemoryMgt - Memory Management CSE to Fall 2010...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online