Allocate memory for string literals and identifiers dinamically.

This commit is contained in:
Ilmir Usmanov
2014-10-23 17:04:07 +04:00
parent e4a7d1c8ac
commit f163f9f5da
7 changed files with 55 additions and 19 deletions
+4
View File
@@ -72,6 +72,10 @@ deserializer_init (void)
void
deserializer_free (void)
{
if (bytecode_data.strs_count > 0)
{
mem_heap_free_block ((uint8_t *) bytecode_data.strings[0].str);
}
mem_heap_free_block ((uint8_t *) bytecode_data.strings);
mem_heap_free_block ((uint8_t *) bytecode_data.nums);
mem_heap_free_block ((uint8_t *) bytecode_data.opcodes);