Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

.net - Garbage collector performance on different machines -


i have large memory consumption .net 2.0 application. ussually gc handles cleaning of memory well. however, have case application installed in 2 different machines, 1 2gb of memory , 1 3gb of memory. in 3gb of memory crashes out of memory exception, while in 2gb nevers fails. .net runtime same in both machines , application installation same. possible when there more memory trigger start grabage collector not raised on time?

the amount of ram has nothing amount of memory available .net program. modern operating systems provide virtual memory. on windows, typical amount of virtual memory available program bit less 2 gigabytes. there's special boot option (/3gb) increases 3 gigabytes, @ cost of taking addressable memory away operating system. doesn't work anymore on modern machines, video card tends eat addressable physical memory. isn't impossible less 2gb because of this.

if machine runs 64-bit operating system you'll close 4 gigabytes if code runs in x86 mode. , oodles of virtual memory in x64 mode, limited maximum size of paging file.

these virtual memory sizes independent of actual amount of ram installed on machine. if have less ram addressable virtual memory space, common 15 years ago, possible invoke so-called 'paging file thrashing'. see operating system trying provide enough available ram honor program's need use virtual memory @ same time. swaps data between ram , paging file. can severely slow down machine, run out of patience before run out of memory.

an outofmemoryexception tells program ran out of addressable virtual memory. typical cause not depleting address space, running out of holes big enough fit object you're trying allocate. virtual memory can become fragmented. sysinterals' vmmap utility can give insight in how virtual memory of program divvied-up.

running out of virtual memory quite difficult deal with, asynchronous exception cannot recover from. exception of doing loading bitmap, kind of object requires lots of (unmanaged) memory , therefore has trouble finding large enough hole. in general, program should never closer using half of available space. that's not difficult, gigabyte lot of memory. when program's needs fundamentally beyond limit must specify 64-bit operating system requirement program. 2 hundred dollar solution.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -