GCSIM
Classes | Enumerations | Variables
allocators.hpp File Reference
#include <format>
#include <memory>
#include <string>
#include <latch>
#include <random>
#include <utility>
#include <concepts>
#include <iostream>
#include "../heap-manager/heap-manager.hpp"
#include "../common/thread-pool/thread-pool.hpp"
#include "../root-set-table/thread-local-stack.hpp"
#include "../root-set-table/global-root.hpp"
#include "../root-set-table/register-root.hpp"

Classes

class  allocators
 simulates the allocations on the heap. More...
 

Enumerations

enum class  simulation_mode { stress , relaxed }
 defines the type of the simulation. More...
 

Variables

size_t constexpr TLS_ALLOC_STRESS_THRESHOLD = 8192
 number of allocations per tls in stress mode.
 
size_t constexpr TLS_SCOPE_COUNT_STRESS = 8
 number of scopes per tls for stress mode.
 
size_t constexpr TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE = TLS_ALLOC_STRESS_THRESHOLD / TLS_SCOPE_COUNT_STRESS
 number of allocations per scope for tls in stress mode.
 
size_t constexpr TLS_MAP_CAPACITY_STRESS = TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE << 1
 capacity of the hash-map that maps tls variable to its index in stress mode.
 
size_t constexpr TLS_ALLOC_RELAXED_THRESHOLD = 1024
 number of allocations per tls in relaxed mode.
 
size_t constexpr TLS_SCOPE_COUNT_RELAXED = 8
 number of scopes per tls in relaxed mode.
 
size_t constexpr TLS_ALLOC_RELAXED_THRESHOLD_PER_SCOPE = TLS_ALLOC_RELAXED_THRESHOLD / TLS_SCOPE_COUNT_RELAXED
 number of allocations per scope for tls in relaxed mode.
 
size_t constexpr TLS_MAP_CAPACITY_RELAXED = TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE << 1
 capacity of the hash-map that maps tls variable to its index in relaxed mode.
 
size_t constexpr GLOBAL_ALLOC_STRESS_THRESHOLD = 128
 number of allocations per global in stress mode.
 
size_t constexpr GLOBAL_ALLOC_RELAXED_THRESHOLD = 32
 number of allocations per global in relaxed mode.
 
size_t constexpr REGISTER_ALLOC_STRESS_THRESHOLD = 128
 number of allocations per register in stress mode.
 
size_t constexpr REGISTER_ALLOC_RELAXED_THRESHOLD = 32
 number of allocations per register in relaxed mode.
 

Enumeration Type Documentation

◆ simulation_mode

enum class simulation_mode
strong

defines the type of the simulation.

Enumerator
stress 
relaxed 

Variable Documentation

◆ GLOBAL_ALLOC_RELAXED_THRESHOLD

size_t constexpr GLOBAL_ALLOC_RELAXED_THRESHOLD = 32
constexpr

number of allocations per global in relaxed mode.

◆ GLOBAL_ALLOC_STRESS_THRESHOLD

size_t constexpr GLOBAL_ALLOC_STRESS_THRESHOLD = 128
constexpr

number of allocations per global in stress mode.

◆ REGISTER_ALLOC_RELAXED_THRESHOLD

size_t constexpr REGISTER_ALLOC_RELAXED_THRESHOLD = 32
constexpr

number of allocations per register in relaxed mode.

◆ REGISTER_ALLOC_STRESS_THRESHOLD

size_t constexpr REGISTER_ALLOC_STRESS_THRESHOLD = 128
constexpr

number of allocations per register in stress mode.

◆ TLS_ALLOC_RELAXED_THRESHOLD

size_t constexpr TLS_ALLOC_RELAXED_THRESHOLD = 1024
constexpr

number of allocations per tls in relaxed mode.

◆ TLS_ALLOC_RELAXED_THRESHOLD_PER_SCOPE

size_t constexpr TLS_ALLOC_RELAXED_THRESHOLD_PER_SCOPE = TLS_ALLOC_RELAXED_THRESHOLD / TLS_SCOPE_COUNT_RELAXED
constexpr

number of allocations per scope for tls in relaxed mode.

◆ TLS_ALLOC_STRESS_THRESHOLD

size_t constexpr TLS_ALLOC_STRESS_THRESHOLD = 8192
constexpr

number of allocations per tls in stress mode.

◆ TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE

size_t constexpr TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE = TLS_ALLOC_STRESS_THRESHOLD / TLS_SCOPE_COUNT_STRESS
constexpr

number of allocations per scope for tls in stress mode.

◆ TLS_MAP_CAPACITY_RELAXED

size_t constexpr TLS_MAP_CAPACITY_RELAXED = TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE << 1
constexpr

capacity of the hash-map that maps tls variable to its index in relaxed mode.

◆ TLS_MAP_CAPACITY_STRESS

size_t constexpr TLS_MAP_CAPACITY_STRESS = TLS_ALLOC_STRESS_THRESHOLD_PER_SCOPE << 1
constexpr

capacity of the hash-map that maps tls variable to its index in stress mode.

◆ TLS_SCOPE_COUNT_RELAXED

size_t constexpr TLS_SCOPE_COUNT_RELAXED = 8
constexpr

number of scopes per tls in relaxed mode.

◆ TLS_SCOPE_COUNT_STRESS

size_t constexpr TLS_SCOPE_COUNT_STRESS = 8
constexpr

number of scopes per tls for stress mode.