title: How are Lua tables handled in memory?
body: <p>How does lua handle a table's growth?</p>
  
  <p>Is it equivalent to the <code>ArrayList</code> in Java? I.e. one that needs continuous memory space, and as it grows bigger than the already allocated space, the internal array is copied to another memory space.</p>
  
  <p>Is there a clever way to led with that?</p>
  
  <p>My question is, <em>how is a table stored in the memory</em>? I'm not asking how to implement arrays in Lua.</p>