Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What commands in C can I use to find size and location . . .

Status
Not open for further replies.

zimbu

Programmer
Jul 12, 2000
4
US
I need to find out how I can, in the C language, find out the location and size of all available memory.  Thanks!
 
Hi Buddy,<br>&quot;All available memory&quot; dangerous words...but I guess U mean all the meory available to the individual process.<br>For that in UNIX we have a system call called getrlimit().<br>e.g getrlimit(RLIMIT_DATA, ); <br>&nbsp;will give U the the maximum size of a process's heap in bytes.<br><br>If U want to find out the physical memory present in the machine...I dont know of any straight-forward way to do that through a C program.<br><br>Adios<br>amit<br><A HREF="mailto:crazy_indian@mailcity.com">crazy_indian@mailcity.com</A><br>
 
<br>Well, to find the available RaM memory, you should use some functions like &quot;coreleft()&quot;. This is good for DOS environements, i dont'know for sure how it works under Win, or if it works. <br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top