로딩중...
검색중...
일치하는것 없음
by::id 구조체 참조

Unique identifier for instances in memlite system 더 자세히 ...

#include <id.hpp>

Public 멤버 함수

 id (nint new_tagN, nint newChkN, nuint newSerial)
 
nbool operator== (const id &rhs) const
 
nbool operator!= (const id &rhs) const
 
void rel ()
 Resets the ID to an invalid or default state.
 
nbool isHeap () const
 Checks if the instance identified by this ID is allocated on the heap.
 
nbool isValid () const
 

Public 속성

nint tagN: 21
 
nint chkN: 22
 
nuint serial: 21
 

상세한 설명

Unique identifier for instances in memlite system

64-bit integer instance identifier. tagN identifies life, chkN indicates which chunk, and serial is used for object validation.

serial is instance creation count during process execution

As seen from pool and chunk, using a custom memory pool means when memory is released, only the destructor is called without initializing all memory. Previously allocated and destroyed data remains, and accessing this data is even possible. (If accessing used data causes exceptions or UB, implementing binder with weak or strong pointers would be impossible.) binder additionally compares serial to distinguish whether retrieved data is truly valid.

tagN used for accessing life objects

watcher uses this value to retrieve the tagN-th life object from its array.

chkN used for retrieving chunk objects

pool first calculates instance size mapped to id to retrieve chunks. Then chunks returns the memory block at its chkN-th element. Externally, the received memory address and serial value are compared to verify it's the same instance.

멤버 함수 문서화

◆ isHeap()

nbool by::id::isHeap ( ) const

Checks if the instance identified by this ID is allocated on the heap.

반환값
true if the associated instance is heap-allocated, false otherwise.

이 구조체에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: