On Wednesday 13 September 2006 12:32 pm, Eddie Dawydiuk wrote:
> Once memory is allocated and freed, the kernel will keep that memory
> and not return it until there is no more free memory available...
This is partly true, but freed memory that remains unreleased is first used to
satisfy new allocations when possible. For example, a cycle of alloc/free on
a fixed block size will cause allocated memory to increase at the first
allocation, when a new slab of memory is allocated to the relevant memory
cache list. But the subsequent allocations simply end up reusing the memory
freed by the prior free command. There's no point growing a given cache list
if it already contains unused memory blocks that can satisfy the allocation
request.
I believe your statement is only true if, over a given time period, the
sum(alloc sizes) > sum(free sizes).
> I agree with you that something is allocating about 4KB every 2-5 hours,
> but I don't believe any data has been presented to indicate a memory
> leak exists.
Given the above, to see free+cached decrease consistently seems a strong
indication that more memory is being allocated than freed over time.
Clearly, a stronger test case is needed, and I'll work on that.
> Could you run your script for a couple of days ... [snip]
> Let me know what you find...
I think a hybrid strategy might work well: use a little program to suck up
most of the free RAM so a leak has a smaller free space to exhaust. This
should decrease the test time. I'll work on this and post the resuts here.
Thanks for the help and the discussion.
Steve
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|