Linux memory/swap questions
bob findlay
fcsoft-rxKNY4w4koG3ikBYyZqyVg at public.gmane.org
Wed Oct 22 15:02:28 UTC 2003
I want use Linux in an embedded situation where I don't need/want swap.
In my application I plan to use (carefully) malloc/free as well as fork()
calls.
In the back of my mind is the now legendary memory fragmentation problem
which brought down a Mars mission a few years back.
I've noticed that it would appear that the Linux kernel is "lazy" when it
comes to adding free'd memory back to the available pool. ie. it will take
new allocations from the unused pool first. At some "low water" mark it
seems to say "OK time to clean up". Mind you I don't have any "hard"
evidence to support this ... just observations via repeated uses of the free
command.
My question is, am I going to encounter problems with memory fragmentation
to the level that perhap my fork() calls will begin to fail? ie. I have
enough memory, just not sufficient contiguous memory.
My understanding of swap is at best superficial, but is this not exactly the
kind of situation which would cause the kernel to swap the oldest process out
to make contiguous RAM available?
Is there a Linux system call which kicks it to do a memory cleanup? Can
memory cleanup even happen without swap around to use during the cleanup?
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list