Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I ran some code last Friday before leaving work, and I'm here on Monday, and it stopped with an OutOfMemoryException. This entire process I estimate required making tens of billions of calculations, so it wasn't some small task.

I don't even know how to begin fixing this.
Any pointers?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
349 views
Welcome To Ask or Share your Answers For Others

1 Answer

Well, given the contet you provided, or the lack thereof, I can only provide some general ideas here: First of all, the obvious answer would be to take a look at the information contained in the exception itself, which should give you an idea of where in your code allocation failed.

Second, you employ memory profiling to get a better idea of what is going on in your application - I'm a user of dotTrace, but there might be free alternatives available.

Apart from this general adivce, you might want to include some more information in your question. What type of objects are you allocating, when are you allocating, are you using native resources etc.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...