Commit f690fea
authored
fix: base address dependant storage (#225)
* fix: memory overused with high base address
The pattern language evaluator uses storage whose size is calculated using the value offset. When a base address has been set that is not zero, the offset will then increase and so will the storage allocated. To correct this we detect when patterns are using the main section to calculate the storage size based on offset that has the base address removed.
* rewrite code for clarity.
* All that was written before is incorrect. The problem was that setVariable was using the offset of the instance inside the input file (value->getOffset()) to calculate the heap storage size instead of using the offset of the instance inside the pattern that occupies the heap (pattern->getOffset()).1 parent 4088d48 commit f690fea
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| |||
0 commit comments