Each object allocated on the GC heap has an 8-byte overhead (sync block + method table pointer).
每个在GC堆中分配的对象有一个8字节的头(同步块+方法表指针)。
It does whatever initialization is required for the module, if any, but most crucially, it also passes a pointer to the method table back to Python.
初始化函数将完成模块所要求的所有初始化操作,但更重要的是,它还把一个指向方法表的指针传回给Python。
For example, a method table does not directly store the name of a particular method, but points to the method's name stored in the string heap.
例如,方法表不直接存储特定方法的名称,而是指向存储在字符串堆中的方法的名称。
应用推荐