MemorySegment.hpp File Reference
#include "stddef.h"
#include "DeadObject.hpp"
#include "Interpreter.hpp"
Include dependency graph for MemorySegment.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MemorySegmentHeader
 
class  MemorySegment
 
class  MemorySegmentSet
 
class  NormalSegmentSet
 
class  LargeSegmentSet
 
class  OldSpaceSegmentSet
 

Macros

#define MemorySegmentOverhead   (sizeof(MemorySegmentHeader))
 
#define MemorySegmentPoolOverhead   (sizeof(MemorySegmentPoolHeader))
 
#define SegmentSize   (256*1024)
 
#define LargeBlockThreshold   4096
 
#define MinimumSegmentSize   (SegmentSize/2)
 
#define MinimumSegmentDeadSpace   (MinimumSegmentSize - MemorySegmentOverhead)
 
#define LargeSegmentSize   (SegmentSize * 4)
 
#define SegmentDeadSpace   (SegmentSize - MemorySegmentOverhead)
 
#define RecoverSegmentSize   ((SegmentSize/2) - MemorySegmentOverhead)
 
#define LargeSegmentDeadSpace   (LargeSegmentSize - MemorySegmentOverhead)
 
#define InitialNormalSegmentSpace   ((LargeSegmentSize * 8) - MemorySegmentOverhead)
 
#define LargestNormalSegmentSize   (LargeObjectMinSize - (1024 * 1024) - MemorySegmentOverhead)
 
#define MemoryThrashingThreshold   4
 
#define LengthToDeadPool(l)   ((l)/ObjectGrain)
 
#define DeadPoolToLength(d)   ((d)*ObjectGrain)
 
#define FirstDeadPool   (LengthToDeadPool(MinimumObjectSize) - 1)
 
#define LargestSubpool   512
 
#define LastDeadPool   LengthToDeadPool(LargestSubpool)
 
#define DeadPools   LastDeadPool + 1
 
#define NormalMemoryExpansionThreshold   .30
 
#define NormalMemoryContractionThreshold   .70
 
#define MaxDeadObjectSpace   1000000
 

Functions

size_t roundSegmentBoundary (size_t n)
 

Macro Definition Documentation

◆ DeadPools

#define DeadPools   LastDeadPool + 1

Definition at line 106 of file MemorySegment.hpp.

◆ DeadPoolToLength

#define DeadPoolToLength (   d)    ((d)*ObjectGrain)

Definition at line 94 of file MemorySegment.hpp.

◆ FirstDeadPool

#define FirstDeadPool   (LengthToDeadPool(MinimumObjectSize) - 1)

Definition at line 99 of file MemorySegment.hpp.

◆ InitialNormalSegmentSpace

#define InitialNormalSegmentSpace   ((LargeSegmentSize * 8) - MemorySegmentOverhead)

Definition at line 79 of file MemorySegment.hpp.

◆ LargeBlockThreshold

#define LargeBlockThreshold   4096

Definition at line 64 of file MemorySegment.hpp.

◆ LargeSegmentDeadSpace

#define LargeSegmentDeadSpace   (LargeSegmentSize - MemorySegmentOverhead)

Definition at line 77 of file MemorySegment.hpp.

◆ LargeSegmentSize

#define LargeSegmentSize   (SegmentSize * 4)

Definition at line 71 of file MemorySegment.hpp.

◆ LargestNormalSegmentSize

#define LargestNormalSegmentSize   (LargeObjectMinSize - (1024 * 1024) - MemorySegmentOverhead)

Definition at line 81 of file MemorySegment.hpp.

◆ LargestSubpool

#define LargestSubpool   512

Definition at line 101 of file MemorySegment.hpp.

◆ LastDeadPool

#define LastDeadPool   LengthToDeadPool(LargestSubpool)

Definition at line 103 of file MemorySegment.hpp.

◆ LengthToDeadPool

#define LengthToDeadPool (   l)    ((l)/ObjectGrain)

Definition at line 91 of file MemorySegment.hpp.

◆ MaxDeadObjectSpace

#define MaxDeadObjectSpace   1000000

Definition at line 115 of file MemorySegment.hpp.

◆ MemorySegmentOverhead

#define MemorySegmentOverhead   (sizeof(MemorySegmentHeader))

Definition at line 52 of file MemorySegment.hpp.

◆ MemorySegmentPoolOverhead

#define MemorySegmentPoolOverhead   (sizeof(MemorySegmentPoolHeader))

Definition at line 53 of file MemorySegment.hpp.

◆ MemoryThrashingThreshold

#define MemoryThrashingThreshold   4

Definition at line 87 of file MemorySegment.hpp.

◆ MinimumSegmentDeadSpace

#define MinimumSegmentDeadSpace   (MinimumSegmentSize - MemorySegmentOverhead)

Definition at line 69 of file MemorySegment.hpp.

◆ MinimumSegmentSize

#define MinimumSegmentSize   (SegmentSize/2)

Definition at line 67 of file MemorySegment.hpp.

◆ NormalMemoryContractionThreshold

#define NormalMemoryContractionThreshold   .70

Definition at line 111 of file MemorySegment.hpp.

◆ NormalMemoryExpansionThreshold

#define NormalMemoryExpansionThreshold   .30

Definition at line 109 of file MemorySegment.hpp.

◆ RecoverSegmentSize

#define RecoverSegmentSize   ((SegmentSize/2) - MemorySegmentOverhead)

Definition at line 75 of file MemorySegment.hpp.

◆ SegmentDeadSpace

#define SegmentDeadSpace   (SegmentSize - MemorySegmentOverhead)

Definition at line 73 of file MemorySegment.hpp.

◆ SegmentSize

#define SegmentSize   (256*1024)

Definition at line 62 of file MemorySegment.hpp.

Function Documentation

◆ roundSegmentBoundary()