title: how to scan the system memory through program?
body: <p>I just want to read the system memory, not the memory allocated for other processes, just free memory.
  I tried allocating huge memory using malloc:</p>
  
  <pre><code>char *ptr;
  ptr = (char*)malloc((1024*1024*700)*sizeof(char));
  </code></pre>
  
  <p>I tried to print it, but it is printing the null character (i.e. nothing).</p>
  
  <pre><code>printf("%c",ptr[i]);
  </code></pre>
  
  <p>So I casted its type to int, thinking that it may print the ascii of it.</p>
  
  <pre><code>printf("",(int)ptr[i]);
  </code></pre>
  
  <p>All the values printed are 0. </p>
  
  <p>malloc doesn't initialize the memory allocated, does it?
  I couldn't print the memory.</p>
  
  <p>I tried it in linux, fedora 14, with latest gcc and windows xp with dev-c++</p>
  
  <p>I just want to access the memory. Is it possible through some kernel pgm in linux by using the address and get the date out of it? Can you suggest some tools for reading the ram?</p>