void Target::init() { ptrsize = GetPointerSize(); realsize = GetTypeAllocSize(Type::basic[Tfloat80]); realpad = realsize - GetTypeStoreSize(Type::basic[Tfloat80]); realalignsize = GetTypeAlignment(Type::basic[Tfloat80]); }
//----------------------------------------------------------------------------- // Name: GetSize // Object: get the size in BYTES of the var according to it's type and item numbers // Warning : return a size aligned on register size (32 bits on a 32 bits processor 64 bits on a 64 bits processor) // Parameters : // Return : //----------------------------------------------------------------------------- SIZE_T CUserDataTypeVar::GetSize() { if (this->NbPointedTimes>0) return GetPointerSize(); // stack size or aligned size is the same SIZE_T Size = this->NbItems*this->pUserDataType->GetSize(); if (Size<REGISTER_BYTE_SIZE) return REGISTER_BYTE_SIZE; SIZE_T Remain = Size%REGISTER_BYTE_SIZE; if (!Remain) return Size; else return Size+REGISTER_BYTE_SIZE-Remain;// supposed to be aligned }