]> gitweb.factorcode.org Git - factor.git/blob - vm/image.hpp
alien.syntax: clarify that we can dispatch off ENUM: members
[factor.git] / vm / image.hpp
1 namespace factor {
2
3 static const cell image_magic = 0x0f0e0d0c;
4 static const cell image_version = 4;
5
6 const size_t STRERROR_BUFFER_SIZE = 1024;
7
8 struct embedded_image_footer {
9   cell magic;
10   cell image_offset;
11 };
12
13 struct image_header {
14   cell magic;
15   cell version;
16   // base address of data heap when image was saved
17   cell data_relocation_base;
18   // size of heap
19   cell data_size;
20   // base address of code heap when image was saved
21   cell code_relocation_base;
22   // size of code heap
23   cell code_size;
24
25   cell reserved_1;
26   cell reserved_2;
27   cell reserved_3;
28   cell reserved_4;
29
30   // Initial user environment
31   cell special_objects[special_object_count];
32 };
33
34 struct vm_parameters {
35   bool embedded_image;
36   const vm_char* image_path;
37   const vm_char* executable_path;
38   cell datastack_size, retainstack_size, callstack_size;
39   cell young_size, aging_size, tenured_size;
40   cell code_size;
41   bool fep;
42   bool console;
43   bool signals;
44   cell max_pic_size;
45   cell callback_size;
46
47   vm_parameters();
48   ~vm_parameters();
49   void init_from_args(int argc, vm_char** argv);
50 };
51
52 }