Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QV4::MemorySegment Struct Reference
+ Collaboration diagram for QV4::MemorySegment:

Public Types

enum  { 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
 

Public Attributes

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

Detailed Description

Definition at line 75 of file qv4mm.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NumChunks 
SegmentSize 

Definition at line 76 of file qv4mm.cpp.

Constructor & Destructor Documentation

◆ MemorySegment() [1/2]

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

Definition at line 85 of file qv4mm.cpp.

References base.

◆ MemorySegment() [2/2]

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

Definition at line 98 of file qv4mm.cpp.

References base, other(), and qSwap().

+ Here is the call graph for this function:

◆ ~MemorySegment()

QV4::MemorySegment::~MemorySegment ( )
inline

Definition at line 106 of file qv4mm.cpp.

References base.

Member Function Documentation

◆ allocate()

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

Definition at line 163 of file qv4mm.cpp.

References base, DEBUG, Qt::hex(), i, Q_ASSERT, setBit(), and testBit().

+ Here is the call graph for this function:

◆ clearBit()

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

Definition at line 117 of file qv4mm.cpp.

References Q_ASSERT.

◆ contains()

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

Definition at line 152 of file qv4mm.cpp.

References base.

◆ free()

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

Definition at line 130 of file qv4mm.cpp.

References base, DEBUG, Q_ASSERT, qMin(), and testBit().

+ Here is the call graph for this function:

◆ setBit()

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

Definition at line 111 of file qv4mm.cpp.

References Q_ASSERT.

◆ testBit()

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

Definition at line 123 of file qv4mm.cpp.

References Q_ASSERT.

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.

◆ pageReservation

PageReservation QV4::MemorySegment::pageReservation

Definition at line 156 of file qv4mm.cpp.


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