available memory from task manager

This is a discussion on available memory from task manager within the Tech Board forums, part of the Community Boards category; Hello everyone, I am using Windows Server 2003. I am confused about the available (memory) value under Physical Memory category. ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    available memory from task manager

    Hello everyone,


    I am using Windows Server 2003. I am confused about the available (memory) value under Physical Memory category.

    From search there are two meanings,

    1. available means free physical memory, not used yet by any application;
    2. available means the total size of physical memory user application could use (exclude System Cache and Kernel Memory, which user application can not use), the user application may actually already used some of them, and they are not *all* free.

    (2) is from http://articles.techrepublic.com.com...1-5071997.html

    --------------------
    Since you know that at this point the operating system is making 208 MB of physical memory available to running programs and that the Total is 243 MB, you can come up with a rough estimate of the actual size of the page file by subtracting the Total Commit Charge from the Available Physical Memory. In this case, you end up with 35 MB.
    --------------------

    My question is, which one do you think is correct? :-)


    thanks in advance,
    George

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,768
    In short, available physical memory is the total amount of physical memory that is not yet used for something. The OS can use that to allocate pages for applications or use it for cache. Typically the kernel memory won't increase since it's fixed, and cache is also fixed on XP and 2003 (AFAIK), but not on Vista (although Vista will still report the cache as free memory).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    I agree with your reply. What is the available mean from Physical Category?

    1. Does it mean pure free memory (no process occupy it)?

    2. Or mean besides Kernel memory and Cache memory, the other amount of memory application process could utilize, and some process may already the available part?

    Quote Originally Posted by Elysia View Post
    In short, available physical memory is the total amount of physical memory that is not yet used for something. The OS can use that to allocate pages for applications or use it for cache. Typically the kernel memory won't increase since it's fixed, and cache is also fixed on XP and 2003 (AFAIK), but not on Vista (although Vista will still report the cache as free memory).

    regards,
    George

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    It means physical memory that is absolutely unused - no process owns it, it is available for the kernel to give to any process. Note also that there's no guarantee that you CAN use ALL of the available memory in any process. Many OS's will want to have a tiny bit of "spare", "just in case" memory, so that if, for example, the swapper process, file-system drivers or such need to allocate memory in a real low memory situation, they can.

    There are also caches and other "not absolutely necessary" memory regions that the OS fills with "useful stuff" when it's possible. These areas will be purged if the OS needs more memoory.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Mats,


    I. Back to my original question and options, I think you agree with (1), right.

    1. available means free physical memory, not used yet by any application;
    2. available means the total size of physical memory user application could use (exclude System Cache and Kernel Memory, which user application can not use), the user application may actually already used some of them, and they are not *all* free.

    II. About how to calculate the size of page file size -- the other item from my original question, do you have any ideas?

    (2) is from http://articles.techrepublic.com.com...1-5071997.html

    --------------------
    Since you know that at this point the operating system is making 208 MB of physical memory available to running programs and that the Total is 243 MB, you can come up with a rough estimate of the actual size of the page file by subtracting the Total Commit Charge from the Available Physical Memory. In this case, you end up with 35 MB.
    --------------------

    Quote Originally Posted by matsp View Post
    It means physical memory that is absolutely unused - no process owns it, it is available for the kernel to give to any process. Note also that there's no guarantee that you CAN use ALL of the available memory in any process. Many OS's will want to have a tiny bit of "spare", "just in case" memory, so that if, for example, the swapper process, file-system drivers or such need to allocate memory in a real low memory situation, they can.

    There are also caches and other "not absolutely necessary" memory regions that the OS fills with "useful stuff" when it's possible. These areas will be purged if the OS needs more memoory.

    --
    Mats

    regards,
    George

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,768
    It seems you do no understand the term physical memory properly.
    In underlying hardware, there is only one memory - RAM, what we typically call physical memory.
    All these terms - kernel memory, system cache, virtual memory - they are not different memory types. They are all physical memory!
    Do you see where this all leads now?
    Used memory is physical that is used by the OS in some way. Whether that is kernel memory, cache or pages by applications doesn't matter. Free physical memory is the opposite to this. Physical memory unused by something. Memory that is free, memory that the OS can use for whatever it thinks necessary, including kernel memory, system cache and applications.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    My question is about what means available memory. I got the definition from Windows Internals, should be more accurate -- total size of standby list, free and zero lists.

    Quote Originally Posted by Elysia View Post
    It seems you do no understand the term physical memory properly.
    In underlying hardware, there is only one memory - RAM, what we typically call physical memory.
    All these terms - kernel memory, system cache, virtual memory - they are not different memory types. They are all physical memory!
    Do you see where this all leads now?
    Used memory is physical that is used by the OS in some way. Whether that is kernel memory, cache or pages by applications doesn't matter. Free physical memory is the opposite to this. Physical memory unused by something. Memory that is free, memory that the OS can use for whatever it thinks necessary, including kernel memory, system cache and applications.

    regards,
    George

  8. #8
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,768
    Already told you. Read the reply again, carefully.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Hi Elysia,


    This is what you said before,

    --------------------
    In short, available physical memory is the total amount of physical memory that is not yet used for something.
    --------------------

    I think not used for something is not 100% correct. :-)

    In the definition of Windows Internals (4th edition), section Examining Memort Usage of chapter 7 Memory Management, the available is 3 parts, standby list, free and zero ones. I think the standby list is not those -- not used for anything, but used for reducing hard page fault, and replaced with soft page fault if the page is requested again which is in standby list.

    Quote Originally Posted by Elysia View Post
    Already told you. Read the reply again, carefully.

    regards,
    George

  10. #10
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,768
    OK, well, perhaps a better definition is that available physical memory is memory that is not marked as used. Thus, the OS can use all that memory in case it needs it for something, discarding anything else it might be used for.
    For example, cache with Vista. Vista automatically uses all available RAM to cache stuff. But if applications request more memory, some cache is thrown away to make room for more application data and therefore, the total available physical memory decreases.

    Keep in mind that all operating systems may not all work the same. While Windows might work way X, other OSes may work way Y, so to speak.

    So in short, available physical memory would be memory that the operating system can assign to anything it wants, when it needs it, because it's free. It's not used for something critical and marked as "used."
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Elysia,


    I agree with you. In this discussion, we agreed that the calculation from the following URL why 35M in page file is wrong. :-)

    This is the root of my confusion from this thread. Well, always good to discuss and learn from you.

    http://articles.techrepublic.com.com...1-5071997.html

    --------------------
    Since you know that at this point the operating system is making 208 MB of physical memory available to running programs and that the Total is 243 MB, you can come up with a rough estimate of the actual size of the page file by subtracting the Total Commit Charge from the Available Physical Memory. In this case, you end up with 35 MB.
    --------------------

    Quote Originally Posted by Elysia View Post
    OK, well, perhaps a better definition is that available physical memory is memory that is not marked as used. Thus, the OS can use all that memory in case it needs it for something, discarding anything else it might be used for.
    For example, cache with Vista. Vista automatically uses all available RAM to cache stuff. But if applications request more memory, some cache is thrown away to make room for more application data and therefore, the total available physical memory decreases.

    Keep in mind that all operating systems may not all work the same. While Windows might work way X, other OSes may work way Y, so to speak.

    So in short, available physical memory would be memory that the operating system can assign to anything it wants, when it needs it, because it's free. It's not used for something critical and marked as "used."

    have a good weekend,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory usage and memory leaks
    By vsanandan in forum C Programming
    Replies: 1
    Last Post: 05-03-2008, 05:45 AM
  2. Replies: 8
    Last Post: 05-02-2008, 03:14 AM
  3. First MFC app - Not listed in Task Manager Applications
    By Dino in forum Windows Programming
    Replies: 3
    Last Post: 03-08-2008, 10:06 AM
  4. Call destructor from memory manager
    By The Wazaa in forum C++ Programming
    Replies: 8
    Last Post: 05-22-2007, 12:10 AM
  5. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 08:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21