The allocated memory priority for new someclass rounded to sizeof (someclass); rounding is probably something like sizeof (someclass) + sizeof (void *), rounded to 32.
This will not tell you that, if there is, someclass allocates memory for its members.
The best way to do this might be to replace the global new operator with a shell in which bytes are written. Note that, as indicated above, the requested bytes are smaller than the actually allocated bytes, for accounting and alignment reasons.
This can be done in C ++, I do not know about C #.
source share