Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Memory usage limits RSS

1 reply

Last post Aug 24, 2011 09:09 AM by MisterGoodcat

(0)
  • idragoev

    idragoev

    Member

    10 Points

    12 Posts

    Memory usage limits

    Aug 24, 2011 08:52 AM | LINK

    Hi all,

    does anybody know what is the maximum memory we can use in Silverlight?

    we have a really large list of objects that we have to keep in memory and at some point it throws System.OutOfMemory exception. I have read somewhere that .Net is actually limited to 2GB or something?

    Thanks!

  • MisterGoodcat

    MisterGoodcat

    All-Star

    32099 Points

    4704 Posts

    Re: Memory usage limits

    Aug 24, 2011 09:09 AM | LINK

    Hi Ivan.

    This is not a limitation of .NET or Silverlight, it is a limit of the 32-bit memory address space.

    32-bit => 2^32 = 4294967296 bytes = 4 GByte. Of that, 2 GByte are system reserved for mapping of hardware and other things. Any technology that runs as 32-bit process on a system is restricted by that (with some tricks the threshold can be extended to 3 GByte).

    One solution to this would be to switch to 64-bit, but a 64-bit version of the Silverlight plug-in will only be released with the upcoming version 5. Until then, you have to improve your memory management and make sure you do not exceed that threshold.