-
由 Foyzur Rahman 提交于
Previously accounting tree and reference to accounts were pointer based. This prevents us from freeing accounts at the end of each statement as later statements of that transaction can potentially access memory and the corresponding accounts. This resulted in a perceived memory leak as the accounts were not freed per-statement. In this implementation we convert pointers to index that can refer to an array of accounts. This allows us to partition indexes based on "generation" to define which accounts are live and which are already dead. This is also a soft-pointer so we don't crash accessing it. This also allows us to optimize the previous heavyweight "rollover" at the time of generation overflow as we no longer need to detect the validity of accounts based on generation, and rather we can just refer to logical range of indexes to identify the liveness. [#120028219]
81627e27