Please don't send postings to majordomo.
On Tue, Aug 10, 1999 at 08:13:52AM -0700, Shane Miller wrote:
> Sir;
>
> i am beginning development of a CAD like program. it will be
> threaded and multi-processor capable (well thanks to SMP O/S
> like linux).
>
> as to the linux's memory management, suppose a program has
> 30 threads. each thread is allocating and deallocating memory.
I assume you are talking about real (shared memory) threads.
> does linux block the other 29 threads when thread <X> wants
> to malloc/free? how about other threads/processes in the process
> table?
Blocking is your problem alone. Or that of libc, if you use default
malloc/free. Any other processes are not your concern but that of the
kernel.
> in a regular, single-processor system, my original C++ program
> spent 50% of its time in malloc/free. i reduced this time very
> significantly by implementing memory pools. the basic algorithm is fairly
> easy to split up across threads. hence linux SMP for more performance.
> but i am wondering if i might be walking into a "technical snare"
> with respect to linux and memory management.
As said, if you implement your own memory management, you have to make
sure that different threads won't stomp on each other. Likewise with
anything else that is shared between threads/processes.
--
Andreas E. Bombe <[EMAIL PROTECTED]>
http://home.pages.de/~andreas.bombe/
RSA 0x886663c9 30 EC 09 73 84 7B 55 83 C4 7A 91 D9 9D C5 4B B0
DSA 0x04880A44 72E5 7031 4414 2EB6 F6B4 4CBD 1181 7032 0488 0A44
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]