| 1 | /* |
| 2 | * Copyright (c) 1999, 2002 Michael J. Roberts. All Rights Reserved. |
| 3 | * |
| 4 | * Please see the accompanying license file, LICENSE.TXT, for information |
| 5 | * on using and copying this software. |
| 6 | */ |
| 7 | /* |
| 8 | Name |
| 9 | vminitim.cpp - VM initialization - "flat" pool implementation |
| 10 | Function |
| 11 | |
| 12 | Notes |
| 13 | |
| 14 | Modified |
| 15 | 07/21/99 MJRoberts - Creation |
| 16 | */ |
| 17 | |
| 18 | #include "vminit.h" |
| 19 | #include "vmpool.h" |
| 20 | #include "vmglob.h" |
| 21 | |
| 22 | /* ------------------------------------------------------------------------ */ |
| 23 | /* |
| 24 | * Initialize the VM with the "flat" pool manager |
| 25 | */ |
| 26 | void vm_init_flat(vm_globals **vmg, const vm_init_options *opts) |
| 27 | { |
| 28 | vm_globals *vmg__; |
| 29 | |
| 30 | /* initialize the base VM structures */ |
| 31 | vm_init_base(vmg, opts); |
| 32 | |
| 33 | /* |
| 34 | * assign the global pointer to the special vmg__ local for |
| 35 | * globals-on-stack configuration |
| 36 | */ |
| 37 | vmg__ = *vmg; |
| 38 | |
| 39 | /* create the flat pools */ |
| 40 | VM_IF_ALLOC_PRE_GLOBAL(G_code_pool = new CVmPoolFlat()); |
| 41 | VM_IF_ALLOC_PRE_GLOBAL(G_const_pool = new CVmPoolFlat()); |
| 42 | } |
| 43 |