Identifying Equivalent Objects to Reduce Memory Consumption
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Identifying Equivalent Objects to Reduce Memory Consumption

on

  • 473 views

Identifying Equivalent Objects to Reduce Memory Consumption

Identifying Equivalent Objects to Reduce Memory Consumption

Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel

Statistics

Views

Total Views
473
Views on SlideShare
473
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Identifying Equivalent Objects to Reduce Memory Consumption Presentation Transcript

  • 1. Identifying Equivalent Objects to Reduce Memory Consumption Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Universidad de Chile September, 2013 Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 2. Introduction A little about objects Creating an object is easy Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 3. Introduction A little about objects Creating an object is easy Object new Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 4. Introduction My application creates lots of objects. Do I need them all? Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 5. Color Example Builder>>createNode ˆ GraphicalElement new color: self defaultColor. Builder>>defaultColor "Gray color" ˆ Color r: 0.5 g: 0.5 b: 0.5 Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 6. Identifying Equivalent Objects to Reduce Memory Consumption Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Universidad de Chile September, 2013 Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 7. Object Equivalence What means Object Equivalence? Two objects o1 and o2 are said equivalent if all objects pointing to o1 may instead point to o2 without affecting the program semantics and execution. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 8. Object Equivalence What means Object Equivalence? Two objects o1 and o2 are said equivalent if all objects pointing to o1 may instead point to o2 without affecting the program semantics and execution. Button "Exit" Button "Apply" Button "Copy" Color "Gray" Color "Gray" Color "Gray" Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 9. Object Equivalence What means Object Equivalence? Two objects o1 and o2 are said equivalent if all objects pointing to o1 may instead point to o2 without affecting the program semantics and execution. Button "Exit" Button "Apply" Button "Copy" Color "Gray" Color "Gray" Color "Gray" Button "Exit" Button "Apply" Button "Copy" Color "Gray" Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 10. Object Equivalence Definition: Our object equivalence definition says that o1 and o2 are equivalent if: o1 and o2 are instances of the same class. o1 and o2 have identical state. o1 and o2 do not mutate. Neither o1 nor o2 uses his identity. (i.e. identityHash) The creation of o1 nor o2 preforms a side effect. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 11. Profiling Memory Profiler Groups the objects in the execution using the previous definition. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 12. Results in Roassal Unnecessary Objects Detected that 10.97% of the objects are unnecessary object. Reduction on the total number of Objects Allowed us to reduce the total number of objects in 5.1%. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  • 13. Conclusions and Future Work What we achieved? Successfully identified redundant objects in the case. Successfully removed some of the redundant objects. And now? More strategies to remove unnecessary objects. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling