free() and memory usage

From: concern (conern_at_somewhere.net)
Date: 02/28/04


Date: Sat, 28 Feb 2004 19:08:41 GMT

Hi all,

On a linux box, there are several instances of my application running for
different purposes, testing/QA... I also running my own test instance
"myapp" on it. During working hours, the "size" in top of myapp is easily
grow and seems no uplimit; after working hour, with same input, the size
will remain around a certain amount, means:
on working hours(myapp was a little slower):
the test client sent 100 requests to myapp, the "size" would grew to 26mb.
after:
the test client sent exactly 100 same content(ensure same processing
routains) request to myapp, size aroud 16mb.

No memleak when checked with valgrind and mtrace() in above 16mb case (the
26mb case needs the working day though).

Here goes my questions:
1) the size of top constantly grows means a leak?
2) if free() of glibc doesn't (always?) return the memory to OS, is this
behave can be affected by process' current running env or time(how long the
process holds the resource) related?
3) what are other possible reasons for above different "size" with same
inputs/outputs to a process?

Thanks in advance

-sean



Relevant Pages

  • free() and memory usage
    ... I also running my own test instance ... the "size" in top of myapp is easily ... the test client sent 100 requests to myapp, the "size" would grew to 26mb. ...
    (comp.os.linux.development.apps)
  • IIS ignores If-Modified-Since (1985) and sends 304
    ... I have an application which modifies certain browser requests as follows: ... MyApp requests page.html from www.server.com, ... MyApp sends the request with the same headers to www.server.com along ...
    (microsoft.public.inetserver.iis)