]> gitweb.factorcode.org Git - factor.git/blob - vm/image.hpp
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / vm / image.hpp
1 namespace factor
2 {
3
4 static const cell image_magic = 0x0f0e0d0c;
5 static const cell image_version = 4;
6
7 struct image_header {
8         cell magic;
9         cell version;
10         /* all pointers in the image file are relocated from
11            relocation_base to here when the image is loaded */
12         cell data_relocation_base;
13         /* size of heap */
14         cell data_size;
15         /* code relocation base */
16         cell code_relocation_base;
17         /* size of code heap */
18         cell code_size;
19         /* tagged pointer to t singleton */
20         cell t;
21         /* tagged pointer to bignum 0 */
22         cell bignum_zero;
23         /* tagged pointer to bignum 1 */
24         cell bignum_pos_one;
25         /* tagged pointer to bignum -1 */
26         cell bignum_neg_one;
27         /* Initial user environment */
28         cell userenv[USER_ENV];
29 };
30
31 struct vm_parameters {
32         const vm_char *image_path;
33         const vm_char *executable_path;
34         cell ds_size, rs_size;
35         cell young_size, aging_size, tenured_size;
36         cell code_size;
37         bool secure_gc;
38         bool fep;
39         bool console;
40         bool signals;
41         cell max_pic_size;
42         cell callback_size;
43 };
44
45 }