blob: 8f1b5f5adcd3b05a757f851f7f9ad5e05aeaf097 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <stdio.h>
#include <stdlib.h>
#include "gen.h"
#include "mem.h"
void init_code_info(code_info *code)
{
size_t size = CODE_ALLOC_SIZE;
code->cur = alloc_code(&size);
if (!code->cur) {
fputs("Failed to allocate memory for generated code\n", stderr);
exit(1);
}
code->last = code->cur + size/sizeof(code_word) - RESERVE_WORDS;
}
|