allocated size of Function
Summary: The intent is to allow heavy users of Function to determine the runtime weight of each of them and evaluate functionally-equivalent options for their code structure (for example: lambda vs function vs `std::bind`) to pick the most space-efficient on their platform. Limitations = If the real function type defines a custom `operator new` that allocates a different amount of memory than `sizeof(...)` suggests it should: that will not be accounted correctly. We can't look into the real function type at what it itself has allocated. This means that if you capture a unique_ptr to `null` or a unique_ptr to a 4Gb buffer the reported size will be the same. Reviewed By: ericniebler Differential Revision: D14512815 fbshipit-source-id: dc636c8bebddabceaeaa8b869bf37c7f0c64c017
Showing
Please register or sign in to comment