When working on flutter/engine#18706 I found that GetAllocationSize was not const, when it probably could be - it should be an idempotent call, especially since the Dart runtime only expects to call it once, and it should never really have to modify any internal resources.
If it can be marked const, we can revert some of the changes to make pointers non-const introduced in flutter/engine#18706.