Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QV4::MemorySegment Struct Reference
Collaboration diagram for QV4::MemorySegment:

Public Types

enum  { NumChunks = 8*sizeof(quint64) , SegmentSize = NumChunks*Chunk::ChunkSize , NumChunks = 8*sizeof(quint64) , SegmentSize = NumChunks*Chunk::ChunkSize }
enum  { NumChunks = 8*sizeof(quint64) , SegmentSize = NumChunks*Chunk::ChunkSize , NumChunks = 8*sizeof(quint64) , SegmentSize = NumChunks*Chunk::ChunkSize }

Public Member Functions

 MemorySegment (size_t size)
 MemorySegment (MemorySegment &&other)
 ~MemorySegment ()
void setBit (size_t index)
void clearBit (size_t index)
bool testBit (size_t index) const
Chunkallocate (size_t size)
void free (Chunk *chunk, size_t size)
bool contains (Chunk *c) const
 MemorySegment (size_t size)
 MemorySegment (MemorySegment &&other)
 ~MemorySegment ()
void setBit (size_t index)
void clearBit (size_t index)
bool testBit (size_t index) const
Chunkallocate (size_t size)
void free (Chunk *chunk, size_t size)
bool contains (Chunk *c) const

Public Attributes

PageReservation pageReservation
Chunkbase = nullptr
quint64 allocatedMap = 0
size_t availableBytes = 0
uint nChunks = 0

Detailed Description

Definition at line 77 of file qv4mm.cpp.

Member Enumeration Documentation

◆ anonymous enum [1/2]

anonymous enum
Enumerator
NumChunks 
SegmentSize 
NumChunks 
SegmentSize 

Definition at line 78 of file qv4mm.cpp.

◆ anonymous enum [2/2]

anonymous enum
Enumerator
NumChunks 
SegmentSize 
NumChunks 
SegmentSize 

Definition at line 78 of file qv4mm.cpp.

Constructor & Destructor Documentation

◆ MemorySegment() [1/4]

QV4::MemorySegment::MemorySegment ( size_t size)
inline

Definition at line 87 of file qv4mm.cpp.

References nChunks, NumChunks, and SegmentSize.

◆ MemorySegment() [2/4]

QV4::MemorySegment::MemorySegment ( MemorySegment && other)
inline

Definition at line 100 of file qv4mm.cpp.

References nChunks.

◆ ~MemorySegment() [1/2]

QV4::MemorySegment::~MemorySegment ( )
inline

Definition at line 108 of file qv4mm.cpp.

◆ MemorySegment() [3/4]

QV4::MemorySegment::MemorySegment ( size_t size)
inline

Definition at line 87 of file qv4mm.cpp.

◆ MemorySegment() [4/4]

QV4::MemorySegment::MemorySegment ( MemorySegment && other)
inline

Definition at line 100 of file qv4mm.cpp.

◆ ~MemorySegment() [2/2]

QV4::MemorySegment::~MemorySegment ( )
inline

Definition at line 108 of file qv4mm.cpp.

Member Function Documentation

◆ allocate() [1/2]

Chunk * QV4::MemorySegment::allocate ( size_t size)

Definition at line 163 of file qv4mm.cpp.

References nChunks.

◆ allocate() [2/2]

Chunk * QV4::MemorySegment::allocate ( size_t size)

◆ clearBit() [1/2]

void QV4::MemorySegment::clearBit ( size_t index)
inline

Definition at line 118 of file qv4mm.cpp.

References nChunks.

◆ clearBit() [2/2]

void QV4::MemorySegment::clearBit ( size_t index)
inline

Definition at line 118 of file qv4mm.cpp.

◆ contains() [1/2]

bool QV4::MemorySegment::contains ( Chunk * c) const
inline

Definition at line 152 of file qv4mm.cpp.

◆ contains() [2/2]

bool QV4::MemorySegment::contains ( Chunk * c) const
inline

Definition at line 152 of file qv4mm.cpp.

◆ free() [1/2]

void QV4::MemorySegment::free ( Chunk * chunk,
size_t size )
inline

Definition at line 130 of file qv4mm.cpp.

◆ free() [2/2]

void QV4::MemorySegment::free ( Chunk * chunk,
size_t size )
inline

Definition at line 130 of file qv4mm.cpp.

◆ setBit() [1/2]

void QV4::MemorySegment::setBit ( size_t index)
inline

Definition at line 113 of file qv4mm.cpp.

References nChunks.

◆ setBit() [2/2]

void QV4::MemorySegment::setBit ( size_t index)
inline

Definition at line 113 of file qv4mm.cpp.

◆ testBit() [1/2]

bool QV4::MemorySegment::testBit ( size_t index) const
inline

Definition at line 123 of file qv4mm.cpp.

References nChunks.

◆ testBit() [2/2]

bool QV4::MemorySegment::testBit ( size_t index) const
inline

Definition at line 123 of file qv4mm.cpp.

Member Data Documentation

◆ allocatedMap

quint64 QV4::MemorySegment::allocatedMap = 0

Definition at line 158 of file qv4mm.cpp.

◆ availableBytes

size_t QV4::MemorySegment::availableBytes = 0

Definition at line 159 of file qv4mm.cpp.

◆ base

Chunk * QV4::MemorySegment::base = nullptr

Definition at line 157 of file qv4mm.cpp.

◆ nChunks

uint QV4::MemorySegment::nChunks = 0

Definition at line 160 of file qv4mm.cpp.

Referenced by MemorySegment(), MemorySegment(), allocate(), clearBit(), setBit(), and testBit().

◆ pageReservation

PageReservation QV4::MemorySegment::pageReservation

Definition at line 156 of file qv4mm.cpp.


The documentation for this struct was generated from the following file: