File: vminitfl.cpp

package info (click to toggle)
qtads 2.1.6-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,156 kB
  • ctags: 18,767
  • sloc: cpp: 133,078; ansic: 26,048; xml: 18; makefile: 11
file content (43 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* 
 *   Copyright (c) 1999, 2002 Michael J. Roberts.  All Rights Reserved.
 *   
 *   Please see the accompanying license file, LICENSE.TXT, for information
 *   on using and copying this software.  
 */
/*
Name
  vminitim.cpp - VM initialization - "flat" pool implementation
Function

Notes

Modified
  07/21/99 MJRoberts  - Creation
*/

#include "vminit.h"
#include "vmpool.h"
#include "vmglob.h"

/* ------------------------------------------------------------------------ */
/*
 *   Initialize the VM with the "flat" pool manager
 */
void vm_init_flat(vm_globals **vmg, const vm_init_options *opts)
{
    vm_globals *vmg__;

    /* initialize the base VM structures */
    vm_init_base(vmg, opts);

    /* 
     *   assign the global pointer to the special vmg__ local for
     *   globals-on-stack configuration 
     */
    vmg__ = *vmg;

    /* create the flat pools */
    VM_IF_ALLOC_PRE_GLOBAL(G_code_pool = new CVmPoolFlat());
    VM_IF_ALLOC_PRE_GLOBAL(G_const_pool = new CVmPoolFlat());
}