0

i have C# application(s) to run for different Processing like Insertion of Record, Extraction of Text, Printing etc..

inernally it having different exe to run given Modules...

i want to efficiently use this application(s) to run in machine as per Machine configuration.

Example: let's say Machine having 8 GB RAM configuration.. i can start multiple instance of single application to improve processing speed.

But concern is, how can i decide number to run parallel instance per application based on machine configuration..

Is there any functionality in C# which say exe to run in given memory limit ?

if any one can advise

Thanks

Viral
  • 363
  • 2
  • 4
  • 14

1 Answers1

0

Applications running in windows uses Virtual memory, for example : a process in 32 bit system has 2 GB, but in 64 bit it will be 1 TB of virtual memory limit, but how the process fit and the memory limit in the physical RAM is handled by the OS, which is Windows here, so you don't have control on how operating system handles physical memory.

I suggest using Parallel Class for parallel processing with C#, the performance will depend on the computer's specifications.

Ali Ezzat Odeh
  • 2,093
  • 1
  • 17
  • 17
  • Thanks for information, does 32 bit system not extend 2 GB memory if there is large file in process ? or will it give out of memory exception at that point ? – Viral Aug 22 '17 at 09:07
  • Well I think it can be done, Check this link : https://msdn.microsoft.com/en-us/library/ff556232.aspx and this answer : https://stackoverflow.com/a/3739143/5462775 – Ali Ezzat Odeh Aug 22 '17 at 09:20
  • But without extending options if you tried to load a large file content into memory an exception will be thrown – Ali Ezzat Odeh Aug 22 '17 at 09:33
  • oh ok, i am thinking to add number of parallel exe instance based on RAM..like for 8 GB RAM, if i consider 2 GB per 32 bit application, i can open 4 exe instance in Parallel... – Viral Aug 22 '17 at 09:52