Manually controlling memory allocation in C# -


i know if possible explicitly declare memory type (physical or virtual memory) should used c# application performing different actions? let me explain example:

lets say, have file of 100 or 200 mb in size. need parse file, access , analyze contents , perform operations on file contents. possible me store entire file , contents of on virtual memory instead of physical memory?

if possible, there side-effects/precautions 1 should keep in mind?

the reason behind question have deal such huge files or datasets (retrieved databases) , perform operations on them, part of need not occur sequentially or synchronized. want improve execution time , performance of application parallelizing non sequential parts, if possible.

generally don't (and shouldn't need to) have insight how physical memory managed. in windows , hence in clr virtual memory.

unless have specific problem should pretend physical memory.

you can depend on operating system intelligently determine should kept in physical memory , can swapped out. swapping occurs if there's memory pressure anyway, i.e. if allocate more memory physically available.

also, 100-200 mb isn't nowadays.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -