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
  • 476,176
  • 80
  • 629
  • 1,111
edgarmtze
  • 24,683
  • 80
  • 235
  • 386

1 Answers1

3

Try this:

currentProcess.Modules[0].BaseAddress
Ry-
  • 218,210
  • 55
  • 464
  • 476
  • @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