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::HeapItem Struct Reference

#include <qv4mmdefs_p.h>

+ Collaboration diagram for QV4::HeapItem:

Public Member Functions

 operator Heap::Base * ()
 
template<typename T >
T * as ()
 
Chunkchunk () const
 
bool isBlack () const
 
bool isInUse () const
 
void setAllocatedSlots (size_t nSlots)
 
size_t size () const
 

Public Attributes

union { 
 
   struct { 
 
      HeapItem *   next 
 
      size_t   availableSlots 
 
   }   freeData 
 
   quint64   payload [Chunk::SlotSize/sizeof(quint64)] 
 
};  
 

Detailed Description

Definition at line 162 of file qv4mmdefs_p.h.

Member Function Documentation

◆ as()

template<typename T >
T * QV4::HeapItem::as ( )
inline

Definition at line 173 of file qv4mmdefs_p.h.

Referenced by QV4::MemoryManager::allocObjectWithMemberData().

+ Here is the caller graph for this function:

◆ chunk()

Chunk * QV4::HeapItem::chunk ( ) const
inline

Definition at line 175 of file qv4mmdefs_p.h.

References QV4::Chunk::ChunkShift.

Referenced by QV4::freeHugeChunk(), isBlack(), isInUse(), setAllocatedSlots(), and size().

+ Here is the caller graph for this function:

◆ isBlack()

bool QV4::HeapItem::isBlack ( ) const
inline

Definition at line 179 of file qv4mmdefs_p.h.

References chunk(), and QV4::Chunk::testBit().

+ Here is the call graph for this function:

◆ isInUse()

bool QV4::HeapItem::isInUse ( ) const
inline

Definition at line 184 of file qv4mmdefs_p.h.

References chunk(), and QV4::Chunk::testBit().

+ Here is the call graph for this function:

◆ operator Heap::Base *()

QV4::HeapItem::operator Heap::Base * ( )
inline

Definition at line 170 of file qv4mmdefs_p.h.

◆ setAllocatedSlots()

void QV4::HeapItem::setAllocatedSlots ( size_t nSlots)
inline

Definition at line 190 of file qv4mmdefs_p.h.

References chunk(), QV4::Chunk::setBit(), and QV4::Chunk::setBits().

+ Here is the call graph for this function:

◆ size()

size_t QV4::HeapItem::size ( ) const
inline

Definition at line 203 of file qv4mmdefs_p.h.

References chunk(), QV4::Chunk::NumSlots, Q_ASSERT, and QV4::Chunk::testBit().

+ Here is the call graph for this function:

Member Data Documentation

◆ [union]

union { ... } QV4::HeapItem

◆ availableSlots

size_t QV4::HeapItem::availableSlots

Definition at line 166 of file qv4mmdefs_p.h.

◆ [struct]

struct { ... } QV4::HeapItem::freeData

◆ next

HeapItem* QV4::HeapItem::next

Definition at line 165 of file qv4mmdefs_p.h.

◆ payload

quint64 QV4::HeapItem::payload[Chunk::SlotSize/sizeof(quint64)]

Definition at line 168 of file qv4mmdefs_p.h.


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