sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.doc.user/html/concepts/perfanalysis/perf_other_dynamic_mem.htm
changeset 2 b9ab3b238396
child 5 844b047e260d
equal deleted inserted replaced
1:1050670c6980 2:b9ab3b238396
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
       
     2 
       
     3 <html>
       
     4 <head>
       
     5 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
       
     6 	<title>Dynamic Memory Characteristics</title>
       
     7     <link href="../../../book.css" rel="stylesheet" type="text/css">
       
     8 </head>
       
     9 
       
    10 <body>
       
    11 <h3>Dynamic Memory Characteristics</h3>
       
    12 <p>  Symbian programming guidelines instruct that memory should be handled as a scarce resource. Basically, memory should be allocated on demand and freed as soon as possible. Based on gathered empirical data, a typical characteristic of a dynamic memory implementation pattern in an Symbian application is the following:</p>
       
    13 <ol>
       
    14   <li>Allocate memory</li>
       
    15   <li>Reset contents of memory</li>
       
    16   <li>Do something</li>
       
    17   <li>Free the allocated memory</li>
       
    18 </ol>
       
    19 <p>If the sequential functional trace shows the above pattern and it occurs frequently in the application, try to determine why it happens. Determine whether allocation and free operations for objects of the same type and size could be replaced with a simple cache.</p>
       
    20 <p>If an application uses dynamic memory extensively, it is beneficial to know statistics of utilized block sizes. Very small block sizes used frequently are potential performance bottlenecks.</p>
       
    21 <div id="footer">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
       
    22 </body>
       
    23 </html>