RSS Feed
News
Jul
17
Posted by Andrew on 17 July 2014 02:57 PM

Recently a member of the Forums reported receiving an OutOfMemoryException in SciChart when appending 40,000,000 points to a DataSeries.

With .NET4.5, AnyCPU, plenty of RAM and a 64-bit operating system this shouldn’t happen, right? This caught us out too so its worth an article to our user-base.

.NET 4.5 AnyCPU != AnyCPU

In .NET4.5, there is a new project setting next to AnyCPU called Prefer 32-Bit, which is the new default setting, which¬†means “If the process runs on a 64-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code”. Yes, you heard that right. AnyCPU != AnyCPU any more.

Prefer32-Bit

 

Prefer 32-Bit If the process runs on a 64-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code.

How to Resolve the OutOfMemoryException in .NET4.5

So, how do we fix this? Simple really:

  • If you compile to x64, the problem goes away entirely. However, you can then only deploy to 64-bit systems.
  • If you compile to AnyCPU using .NET4.5 or above, ensure that you uncheck the Prefer 32-Bit flag.

Find out more in the video below

WatchVideo

Best regards
[SciChart HQ]


Comments (0)

CONTACT US

Not sure where to start? Contact us, we are happy to help!


CONTACT US

SciChart Ltd, 16 Beaufort Court, Admirals Way, Docklands, London, E14 9XL. Email: Legal Company Number: 07430048, VAT Number: 101957725