kouzdra (kouzdra) wrote,
kouzdra
kouzdra

Крик души:

http://cloudbings.com/questions/1496117/nested-dictionary-size-growth
I have a simple Dictionary<long, long> object which takes up 500 MB space when i populate 10 million entries in it. But when I use nested dictionary Dictionary<long, Dictionary<long, long>>, the same 10 million entries were taking 2.5 GB space. The internal dictionary was filled with only single entry.

Can someone help in explaining how the dictionary in .net is allocated memory and how does it grow in size?
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 104 comments