mercredi 4 juin 2014

Heap size in C# / .Net Framework - Can it grow and how?


Vote count:

0




I've encounterd a confusing matter written in one of my college books: It is stated there that "The heap is not static and can grow as needed by requesting more memory from the operating system".


So what I'm confused about is the following: Suppose I run my application, and objects are allocated on the heap. At some point, the application runs out of memory: what happens now?


From what I understand, Gc (Garbage collector) kicks in and begins it's mark and sweep operations. I wonder if somehow, instead of invoking the Gc by the CLR, is there any possibility for the heap to request more memory from the operating system?


I read that in C++ language, there is a way to achieve that, but is it possible in C# .Net Framework 4.5?


Thank you for your time and will be grateful for any help!



asked 32 secs ago






Aucun commentaire:

Enregistrer un commentaire