Integer类的定义如下: typedef SecBlock<word, AllocatorWithCleanup<word,CRYPTOPP_BOOL_X86> > IntegerSecBlock; class CRYPTOPP_DLL Integer : private InitilizeInteger, public ASN1Object { ... enum Sign { POSITIVE=0, NEGATIVE=1 }; ... IntegerSecBlock reg; Sign sign; } 其内存布局为: class ?$SecBlock@IV?$AllocatorWithCleanup@I$00@CryptoPP@@ size(12): +--- 0 | ?$AllocatorWithCleanup@I$00 m_alloc | (size=3) 4 | m_size 8 | m_ptr +--- class Integer size(20): +--- | +--- (base class ASN1Object) 0 | | {vfptr} | +--- | +--- (base class InitializeInteger) | +--- 4 | ?$SecBlock@IV?$AllocatorWithCleanup@I$00@CryptoPP@@ reg 16 | Sign sign +--- class ECPPoint size(44): +--- 0 | identity | (size=3) 4 | Integer x 24 | Integer y ECPPoint的定义如下: //! Elliptical Curve Point struct CRYPTOPP_DLL ECPPoint { ECPPoint() : identity(true) {} ECPPoint(const Integer &x, const Integer &y) : identity(false), x(x), y(y) {} ... bool identity; Integer x, y; }; 其内存布局为一个布尔型变量,然后是两个Integer