Implementing object model, memory allocators finalization routines. Adding assertion that all memory was freed before exit.

This commit is contained in:
Ruben Ayrapetyan
2014-08-07 19:24:32 +04:00
parent 5e1c4b533f
commit 99c15ef802
16 changed files with 140 additions and 20 deletions
+2 -2
View File
@@ -31,7 +31,7 @@
U8 nums_count;
U32 nums[nums_count];
} */
uint8_t *bytecode_data;
extern uint8_t *bytecode_data;
OPCODE bytecode_opcodes[MAX_OPCODES];
#endif // BYTECODE_LINUX_H
#endif // BYTECODE_LINUX_H
+9
View File
@@ -22,6 +22,8 @@
static bool print_opcodes;
uint8_t *bytecode_data = NULL;
void
serializer_init (bool show_opcodes)
{
@@ -142,3 +144,10 @@ serializer_print_opcodes (void)
pp_opcode (loc, bytecode_opcodes[loc], false);
}
}
void
serializer_free (void)
{
mem_heap_free_block( bytecode_data);
bytecode_data = NULL;
}
+2
View File
@@ -32,4 +32,6 @@ void serializer_rewrite_opcode (const opcode_counter_t, OPCODE);
void serializer_print_opcodes (void);
void serializer_free(void);
#endif // SERIALIZER_H