SMP-linuxthreads-malloc question

From: Reto Baettig (baettig@scs.ch)
Date: Fri May 26 2000 - 17:46:27 EST


Hi folks

please excuse me, maybe this is not a kernel-related question but it
could be (my observations were made in userland).

when multiple (linux-)threads are calling lots of malloc()/free(), it
often happens that the malloc() call returns NULL although I have enough
memory left. This happens with Linux 2.2.14 SMP on Alpha and on Intel.
It does not happen on 2.2.14UP or on Tru64 SMP (by the way: Tru64 is
much much faster for the same problem: 20 threads calling
malloc(1024*1024)/free())

Is this a bug or another so-called "posix-feature" ???

By the way: Another Linux-Kernel-Newbie-Question: Is vmalloc in 2.2
Kernels SMP-safe? (vm_list is a global structure that is not protected
by a lock and vmalloc can sleep. Is the global lock-kernel enough?)

(I attached the testcode)

Reto


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:16 EST