[Mono-devel-list] [PATCH] Field Layout Optimization
bmaurer at users.sourceforge.net
Mon Mar 15 15:43:40 EST 2004
On Mon, 2004-03-15 at 14:40, Bernie Solomon wrote:
> If you are going to do this sort of relayout then it would be good to
> implement the full behaviour which looking at the LayoutKind
> documentation says for Auto:
> The runtime automatically chooses an appropriate layout for the
> members of an object in unmanaged memory. Objects defined
> with this enumeration member cannot be exposed outside of
> managed code. Attempting to do so generates an exception.
> Note the last sentence. If you don't people will get all sorts
> of odd behaviour with pinvoke if there is no explicit exception
> (of course this could force the corlib problems for structs of
> POD data to get fixed too).
Actually, we already do some relayout (we move reference fields to the
top). However, this is a bug, and should probably be filed.
More information about the Mono-devel-list