Implementing object model, memory allocators finalization routines. Adding assertion that all memory was freed before exit.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user