A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
GlobalVariables.cc
Go to the documentation of this file.
1
/*****************************************************************************
2
* *
3
* Copyright 2018 Rice University *
4
* *
5
* Licensed under the Apache License, Version 2.0 (the "License"); *
6
* you may not use this file except in compliance with the License. *
7
* You may obtain a copy of the License at *
8
* *
9
* http://www.apache.org/licenses/LICENSE-2.0 *
10
* *
11
* Unless required by applicable law or agreed to in writing, software *
12
* distributed under the License is distributed on an "AS IS" BASIS, *
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14
* See the License for the specific language governing permissions and *
15
* limitations under the License. *
16
* *
17
*****************************************************************************/
18
19
#ifndef GLOBAL_VARS_CC
20
#define GLOBAL_VARS_CC
21
22
#include "
Allocator.h
"
23
#include "
VTableMap.h
"
24
25
// there are a number of global variables that make the PDB object model work. All of these
26
// global variables are defined in this file.
27
28
// set to true if we live in a shared library... this is here mostly because we
29
// want to be able to close shared libraries when we are done with them, but if
30
// we try to close a shared library within that shared library, badness results
31
bool
inSharedLibrary
=
false
;
32
33
// this is the allocator for pdb :: Objects that is associated with the main thread
34
Allocator
mainAllocator
;
35
36
// since we want to be able to change the allocator, we use a pointer to it
37
Allocator
*
mainAllocatorPtr
= &
mainAllocator
;
38
39
// these tell us where the call stack for all of the threads in the PDBWorkerQueue
40
// is located
41
void
*
stackBase
=
nullptr
;
42
void
*
stackEnd
=
nullptr
;
43
// there is one VTableMap, used throughout the process. This is it
44
VTableMap
globalVTable
;
45
46
// all accesses to the VTableMap go through this pointer. This is key because
47
// if we set this pointer within a shared library, the shared library will use
48
// the process' VTAbleMap
49
VTableMap
*
theVTable
= &
globalVTable
;
50
51
// the exception thrown when we run out of data
52
NotEnoughSpace
myException
;
53
54
55
#endif
mainAllocatorPtr
Allocator * mainAllocatorPtr
Definition:
GlobalVariables.cc:37
Allocator.h
pdb::Allocator
MultiPolicyAllocator< DefaultPolicy, NoReusePolicy, NoReferenceCountPolicy > Allocator
Definition:
Allocator.h:522
myException
NotEnoughSpace myException
Definition:
GlobalVariables.cc:52
VTableMap.h
stackEnd
void * stackEnd
Definition:
GlobalVariables.cc:42
globalVTable
VTableMap globalVTable
Definition:
GlobalVariables.cc:44
theVTable
VTableMap * theVTable
Definition:
GlobalVariables.cc:49
pdb::VTableMap
Definition:
VTableMap.h:52
stackBase
void * stackBase
Definition:
GlobalVariables.cc:41
inSharedLibrary
bool inSharedLibrary
Definition:
GlobalVariables.cc:31
mainAllocator
Allocator mainAllocator
Definition:
GlobalVariables.cc:34
plinycompute
pdb
src
objectModel
headers
GlobalVariables.cc
Generated on Mon Jun 18 2018 18:10:36 by
1.8.6