[Opensim-dev] .NET 32 bit or 64 bit in use?

Sean McNamara smcnam at gmail.com
Mon Jan 11 09:19:54 UTC 2016


Let's find out :)

 > OpenSim.Framework.Servers.BaseOpenSimServer

So....

https://github.com/opensim/opensim/blob/master/OpenSim/Framework/Servers/BaseOpenSimServer.cs#L156

m_log.InfoFormat(
"[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n",
Environment.OSVersion, Environment.OSVersion.Platform,
Util.Is64BitProcess() ? "64" : "32");

which means you'll only read "64-bit" in the log string if
Util.Is64BitProcess() returns true.

Then, https://github.com/opensim/opensim/blob/b2592ab132d5ec69a6c04c9051174057e522c0cd/OpenSim/Framework/Util.cs#L2114


return IntPtr.Size == 8;

...which is guaranteed only to return true if the process is a 64-bit
image (8 word memory addresses).


Though, from the sound of a StackOverflow post, 32-bit .NET 2.0 on
64-bit Windows might misreport IntPtr.Size. Not sure if they are
talking about the OS bitness or the .NET bitness. See
http://stackoverflow.com/a/336729/420156

Anyway, unless it's running on the .NET *2.0* runtime, you can be
pretty certain that you have a 64-bit .NET process.

Wouldn't recommend running a 32-bit .NET process, since that's limited
to 4 GiB of virtual address space, and it's very easy to exceed that
with a few regions in OpenSim.


Sean



On Mon, Jan 11, 2016 at 3:49 AM, Ai Austin <ai.ai.austin at gmail.com> wrote:
> I notice that on my Windows 10 64 bit OS setup when I start Robust.exe it
> reports that its using .NET platform Win32NT, though that is followed by "64
> bit". I am not sure if that refers to the OS or the .NET framework in use...
> like this....
>
> 2016-01-11 08:40:51,551 INFO  (1) -
> OpenSim.Framework.Servers.BaseOpenSimServer [STARTUP]: Operating system
> version: Microsoft Windows NT 6.2.9200.0, .NET platform Win32NT, 64-bit
>
> I wonder if anyone can cast a light on this and whether its important to
> have it set to a 64 bit version of .NET for best use in OpenSim?
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev


More information about the Opensim-dev mailing list