lkml.org 
[lkml]   [2009]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [TOMOYO 1/2] tomoyo: add Documentation/tomoyo.txt
On Fri 2009-05-01 22:07:31, Tetsuo Handa wrote:
> Sorry for delayed response.
>
> Pavel Machek wrote:
> > 2.5 Memory Allocation Rules
> >
> > In TOMOYO Linux, memory allocated for holding access permissions and
> > words are never freed. There is no way except rebooting the system
> > that can free unneeded memory.
> >
> > But don't worry. The policy seldom changes after you start production
> > mode. By tuning policy before starting production mode, you can reduce
> > memory usage to (usually) less than 1 MB.
> >
> > ....does that mean that it leaks memory by design?
>
> This is memory leak, but *controlled* memory allocation with a strategy for
> avoiding memory fragmentation and reducing memory usage. kstrdup()ing string
> data produces partially unused memory block since string data's length is
> unlikely power of two. Therefore, TOMOYO allocates memory in PAGE_SIZE bytes
> block and embeds string data as much as possible.
> TOMOYO does not continue allocating forever.

The document above says otherwise. 'There is no way except rebooting
the system that can free unneeded memory' certainly looks like memory
leak. Plus it sounds like if you change the policy, it will not free
the old one, either.

Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2009-05-03 23:59    [W:0.159 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site