LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Memory Usage on Linux (https://www.linuxquestions.org/questions/linux-software-2/memory-usage-on-linux-224176/)

lchand_p 08-30-2004 01:25 AM

Memory Usage on Linux
 
Hi,

I am Using /proc/meminfo to get the memory as

Used Memory, Used Memory, Total Memory, shared buffers, cached
6438912 6152192 286720 0 32768 1413120

1. Here As we are using 8 MB of SDRAM Only 6.1 MB is shown in the above list what about other remaining 1.9 MB where it is being used.

2. My Application when it is loaded the proc/meminfo says it took 2.5 MB but in the objdump of my application bss+txt+data is 1.7 MB where is the remaining .8 MB used.(till that time even my application is not initialized it is only loaded into SDRAM).

Please clarify my questions.

Thanks in Advance
L.Chand

btmiller 08-30-2004 02:02 AM

(1) Unfreeable memory used by the kernel and reserved for I/O operations is not reported in /proc/meminfo AFAIK.

(2) Probably the extra .8 MB comes from runtime allocations on the stack and on the heap.

halturata 06-19-2006 06:17 AM

Quote:

Originally Posted by btmiller
(1) Unfreeable memory used by the kernel and reserved for I/O operations is not reported in /proc/meminfo AFAIK.

Does this mean that when I have the following output from 'cat /proc/meminfo':
Code:

        total:    used:    free:        shared: buffers:  cached:
Mem:  1056309248 34586624 1021722624        0        0    24989696
Swap:        0        0        0
MemTotal:      1031552 kB
MemFree:        997776 kB
MemShared:          0 kB
Buffers:            0 kB
Cached:          24404 kB
SwapCached:          0 kB
Active:          4472 kB
Inactive:        19940 kB
HighTotal:          0 kB
HighFree:            0 kB
LowTotal:      1031552 kB
LowFree:        997776 kB
SwapTotal:          0 kB
SwapFree:            0 kB
Size:          1048576 kB

there is no memory assigned for I/O operations? After all
1048576 - 1031552 = 17024kB, which is the kernel memory usage, I assume.
Am I right about that?


All times are GMT -5. The time now is 09:23 PM.