mirror of https://github.com/mosra/magnum.git
Browse Source
This was due to the internal counter in the object being just 2 bytes, which was made in order to optimize the Object class size. In practice however, not counting the vtables, the class has SEVEN pointers and then a transformation part that's in most cases multiple of 8. Which means that on 64 bit platforms there was always 5 bytes of padding next to this 2-byte counter and 1-byte flags, thus no reason to have it 2-byte anyway. On 32-bit platforms this *might* cause the Object to get bigger, yes, but as it's heap-allocated it's more likely that it's put on a 16-byte-aligned address and thus occupying a multiple of 16 bytes anyway. In any case, this won't really hurt, because the SceneGraph situation is bad enough already due to all the pointer chasings and overhead from loose allocations.pull/638/head
2 changed files with 18 additions and 10 deletions
Loading…
Reference in new issue