a:5:{s:7:"#markup";O:25:"Drupal\Core\Render\Markup":1:{s:9:"*string";s:2099:"<article role="article" about="/archives/yaffs1-memory-footprint" class="book is-promoted full clearfix">

  
    

  
  <div class="content">
    
            <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item">
<p>Yaffs claims a 'low memory footprint', but what exactly does that mean? How low is low?</p>
<p>Calculating an exact footprint is no easy task. There are many dependencies. Here is an approximation for Yaffs1 on Linux, assuming the standard block size of 512bytes per page and 16kB per block.</p>
<ol>
<li>Code size. This is dependent on various factors including CPU choice, optiomisation options etc. As a rough guide, the yaffs.o Linux module for x86 is around 55kBytes. This could be made smaller by stripping the debug text and ECC code if you don't need that. </li>
<li>Run-time data structures. Some of these are fixed size and others are generated in runtime and change as your file structures change. As a rough guide though I will give the following:
<ol type="a">
 <li>Each yaffs partition needs a device structure of less than 1kB + approx 2-4kB stack with the current implementation. </li>
 <li>If shortOpCaches are enabled, then 524 bytes per cache entry (5 to 10 is a good number). </li>
 <li>About 120 bytes per file. (With short name caching enabled) </li>
 <li>About 4 bytes per block of NAND (ie. about 128 bytes per MB of NAND). </li>
 <li>About 4kBytes of RAM per MB of NAND for building the file TNode trees that are used to locate the data chunks. </li>
</ol>
 </li>
</ol>
<p>Thus for a system using a 64MByte NAND and say 500 files you can budget on approx:</p>
<ul>
<li>1) 55kBytes </li>
<li>2a) 5kB </li>
<li>2b) 3kB (5 cache entries) </li>
<li>2c) 60kB </li>
<li>2d) 16kB </li>
<li>2e) 256kB </li>
</ul>
<b>Total 410kBytes</b>
<p>The last item, the tnodes, is the biggest expense in Yaffs. This can be reduced significantly by using a larger page size.</p>
<p>There are some opportunities to tune some of these numbers so please feel free to discusss further if required.</p>
</div>
      
  </div>

</article>
";}s:9:"#attached";a:1:{s:14:"html_head_link";a:3:{i:0;a:2:{i:0;a:2:{s:3:"rel";s:9:"canonical";s:4:"href";s:33:"/archives/yaffs1-memory-footprint";}i:1;b:1;}i:1;a:2:{i:0;a:2:{s:3:"rel";s:9:"shortlink";s:4:"href";s:9:"/node/348";}i:1;b:1;}i:2;a:2:{i:0;a:2:{s:3:"rel";s:8:"revision";s:4:"href";s:33:"/archives/yaffs1-memory-footprint";}i:1;b:1;}}}s:6:"#cache";a:3:{s:8:"contexts";a:7:{i:0;s:28:"languages:language_interface";i:1;s:5:"theme";i:2;s:8:"timezone";i:3;s:17:"url.path.is_front";i:4;s:16:"user.permissions";i:5;s:20:"user.roles:anonymous";i:6;s:24:"user.roles:authenticated";}s:4:"tags";a:5:{i:0;s:30:"config:filter.format.full_html";i:1;s:18:"config:system.site";i:2;s:8:"node:348";i:3;s:9:"node_view";i:4;s:6:"user:3";}s:7:"max-age";i:-1;}s:17:"#cache_properties";a:1:{i:0;s:6:"#title";}s:6:"#title";O:25:"Drupal\Core\Render\Markup":1:{s:9:"*string";s:37:"<span>Yaffs1 memory footprint</span>
";}}