-
When using GCC we can take the advantage of __builtin_object_size() to know the allocated size of a memory area, this generally only works when some optimization level enabled (-O1 seems enough here) and can provide us with memory size information for lower-level optimizations.
c580b5c2