1

How to get the start memory location of a process in c#

I have been doing this, but do not know

Process currentProcess  = System.Diagnostics.Process.GetCurrentProcess();
long totalBytesOfMemoryUsed = currentProcess.WorkingSet64;

currentProcess.ProcessName
currentProcess.PrivateMemorySize
currentProcess.VirtualMemorySize
Jerry Coffin
  • 455,417
  • 76
  • 598
  • 1,067
edgarmtze
  • 23,987
  • 75
  • 226
  • 373

1 Answers1

3

Try this:

currentProcess.Modules[0].BaseAddress
Ry-
  • 209,133
  • 54
  • 439
  • 449
  • @cMinor: Well, they're process modules. http://msdn.microsoft.com/en-us/library/system.diagnostics.process.modules.aspx See the Remarks section. Index `0` is always the base process. – Ry- Mar 21 '12 at 23:48