Thread: Allocating ram

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    23

    Allocating ram

    HI
    Does anybody know how to allocate ram that si being used and how much of ram is free. OS is Linux.
    Have a nice Day

    Matt

  2. #2
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    Why would you want to allocate RAM that is already being used?

    There's no standard C way to determine how much free RAM there is available. This question belongs in the Linux programming forum.

  3. #3
    Sr. Software Engineer filker0's Avatar
    Join Date
    Sep 2005
    Location
    West Virginia
    Posts
    235

    /proc/meminfo

    A bewildering number of system memory statistics are available in /proc/meminfo on recent Linux systems. There is a web page at RedHat that describes what's in /proc/meminfo at some level of detail.
    Insert obnoxious but pithy remark here

  4. #4
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Hi
    You may want to have a look at

    http://www.advancedlinuxprogramming.com/

    Chapter 7 The /proc file system describes some tips about /proc. ou may find something useful...
    And also free(1) shows you the amoount of free memory. The free(1) system command is a part of the procfs package. You can get the package from

    http://procps.sourceforge.net/

    See the free.c file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RAM upgrade
    By BobS0327 in forum Tech Board
    Replies: 6
    Last Post: 12-10-2008, 08:14 AM
  2. Ways to save RAM when RAM is very limited
    By suzanne_lim in forum C Programming
    Replies: 22
    Last Post: 02-07-2006, 01:39 AM
  3. Programming and RAM
    By spveer in forum C Programming
    Replies: 3
    Last Post: 06-16-2005, 11:17 AM
  4. RAM how do i know?
    By Boomba in forum Tech Board
    Replies: 5
    Last Post: 06-18-2003, 08:17 PM
  5. pointerz
    By xlordt in forum C Programming
    Replies: 6
    Last Post: 01-11-2002, 08:31 PM