<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
My app start at 761k X 2 because a have an extra thread and my app is waiting to receive a command from another tcpip program that contrôle it. So I know when it start allocate memory to start doing what the app must do because a must send a command to start it.<BR>
 <BR>
I used ps -el | grep myapp to see the program size, the "top" utility reported 0%.<BR>
 <BR>
I just added 4 more gig to my AMD 6400 computer, so it's using 8gig of RAM now.<BR>
 <BR>
now, when I ran my app, after it allocated 3gig of RAM, "top" reported that my app used 40.5% of memory, it's suppose to be 37.5% so there is an extra 240 meg I dont know from where it come from.<BR>
 <BR>
ps -el reported that the parent thread is 809k in size and the child thread that do all the malloc is 828394k in size, It doesn't seem logic!<BR>
 <BR>
any idea.<BR>
 <BR>
----- when my app is currently allocating memory (see below)-----<BR>[trembb@cons15 ~]$ cat /proc/meminfo | more<BR>MemTotal:      8168496 kB<BR>MemFree:       4319256 kB<BR>Buffers:         18132 kB<BR>Cached:         344564 kB<BR>SwapCached:          0 kB<BR>Active:        3613836 kB<BR>Inactive:       138524 kB<BR>SwapTotal:     2031608 kB<BR>SwapFree:      2031608 kB<BR>Dirty:               0 kB<BR>Writeback:           0 kB<BR>AnonPages:     3389672 kB<BR>Mapped:          29108 kB<BR>Slab:            32848 kB<BR>SReclaimable:    12200 kB<BR>SUnreclaim:      20648 kB<BR>PageTables:      14228 kB<BR>NFS_Unstable:        0 kB<BR>Bounce:              0 kB<BR>CommitLimit:   6115856 kB<BR>Committed_AS:  3532976 kB<BR>VmallocTotal: 34359738367 kB<BR>VmallocUsed:     41884 kB<BR>VmallocChunk: 34359693623 kB<BR>HugePages_Total:     0<BR>HugePages_Free:      0<BR>HugePages_Rsvd:      0<BR>Hugepagesize:     2048 kB<BR>
-----<BR>
----- When my app as terminated so no more memory is used (see below)-----<BR>
[trembb@cons15 ~]$ cat /proc/meminfo | more<BR>MemTotal:      8168496 kB<BR>MemFree:       7635816 kB<BR>Buffers:         18152 kB<BR>Cached:         344644 kB<BR>SwapCached:          0 kB<BR>Active:         303196 kB<BR>Inactive:       138552 kB<BR>SwapTotal:     2031608 kB<BR>SwapFree:      2031608 kB<BR>Dirty:               4 kB<BR>Writeback:           0 kB<BR>AnonPages:       79092 kB<BR>Mapped:          27848 kB<BR>Slab:            32844 kB<BR>SReclaimable:    12200 kB<BR>SUnreclaim:      20644 kB<BR>PageTables:       7712 kB<BR>NFS_Unstable:        0 kB<BR>Bounce:              0 kB<BR>CommitLimit:   6115856 kB<BR>Committed_AS:   222308 kB<BR>VmallocTotal: 34359738367 kB<BR>VmallocUsed:     41884 kB<BR>VmallocChunk: 34359693623 kB<BR>HugePages_Total:     0<BR>HugePages_Free:      0<BR>HugePages_Rsvd:      0<BR>Hugepagesize:     2048 kB<BR>
-----<BR>
 <BR>
thanks for your help!<BR>
 <BR>
Benoit<BR><BR>> Date: Thu, 14 Feb 2008 14:30:59 -0800<BR>> From: john.wendel@metnet.navy.mil<BR>> To: fedora-list@redhat.com<BR>> Subject: Re: memory reported under linux higher that allocated?<BR>> <BR>> Benoit Tremblay wrote:<BR>> > Hi,<BR>> > <BR>> > I have 4 gig of RAM and when I allocate 3 gig the <top> utilities show <BR>> > that my application is using 87% of the available RAM, so it's a half a <BR>> > gig more, why? The application is not doing any disk access.<BR>> > <BR>> > I just do a couple of malloc and the same amount of free at exit. I <BR>> > count all malloc by incrementing a "m" variable and I decrement the same <BR>> > "m" variable when doing free and at the program exit I display the value <BR>> > of "m" and it is zero. I stop doing malloc when my "m" variable reach 3 <BR>> > gigabytes so I am sure I allocate only 3 gigabytes so why my application <BR>> > is using 87% of all available RAM?<BR>> > <BR>> > Benoit<BR>> > <BR>> <BR>> What is the "available" RAM before your app starts? It is less than 4 <BR>> GB, since there is a lot of other stuff running in addition to your app.<BR>> <BR>> How much memory is you app using that isn't part of the malloc request?<BR>> <BR>> John<BR>> <BR>> -- <BR>> fedora-list mailing list<BR>> fedora-list@redhat.com<BR>> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list<BR><BR><br /><hr /> <a href='' target='_new'></a></body>
</html>