S
sparc
Hi Guys,
I am encountering the following issue :
void* pMemory = m_Allocator.allocate( uiSize * sizeof( T ) );
m_atData = new( pMemory ) T[m_uiSize];
Debug.vc8.scurc.exe!`eh vector constructor iterator'(void *
ptr=0x00514b9c, unsigned int size=12, int count=12, void (void *)*
pCtor=0x00414537, void (void *)* pDtor=0x00414523) + 0x5e bytes C++
Do I need to code my own construct_n( ) ? I am ok with it but I just
want to know why there is an offset between m_atData and pMemory.
Technically I believe the m_atData should point to the same location
as pMemory after placement new is done. However this is turning out to
be false. The address of m_atData is addressof pMemory + 4. Iam
puzzled as this does not happen all the time. For some classes it
works fine and for others it dont.
I might be naive on this although I have tried debugging most of the
trivial stuff. Could someone please help ?
Thanks in advance
Venkatesh.SC
I am encountering the following issue :
void* pMemory = m_Allocator.allocate( uiSize * sizeof( T ) );
m_atData = new( pMemory ) T[m_uiSize];
Debug.vc8.scurc.exe!`eh vector constructor iterator'(void *
ptr=0x00514b9c, unsigned int size=12, int count=12, void (void *)*
pCtor=0x00414537, void (void *)* pDtor=0x00414523) + 0x5e bytes C++
Do I need to code my own construct_n( ) ? I am ok with it but I just
want to know why there is an offset between m_atData and pMemory.
Technically I believe the m_atData should point to the same location
as pMemory after placement new is done. However this is turning out to
be false. The address of m_atData is addressof pMemory + 4. Iam
puzzled as this does not happen all the time. For some classes it
works fine and for others it dont.
I might be naive on this although I have tried debugging most of the
trivial stuff. Could someone please help ?
Thanks in advance
Venkatesh.SC