ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Memory leak?

To:
Subject: Re: [ts-7000] Re: Memory leak?
From: "R. Steve McKown" <>
Date: Wed, 13 Sep 2006 16:47:40 -0600
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/
 


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU