Przemyslaw Czerpak wrote:
here are some words about dlmalloc and multi-thread:
Thread-safety: NOT thread-safe unless USE_LOCKS defined
When USE_LOCKS is defined, each public call to malloc, free,
etc is surrounded with either a pthread mutex or a win32
spinlock (depending on WIN32). This is not especially fast, and
can be a major bottleneck. It is designed only to provide
minimal protection in concurrent environments, and to provide a
basis for extensions. If you are using malloc in a concurrent
program, consider instead using nedmalloc
(http://www.nedprod.com/programs/portable/nedmalloc/) or
ptmalloc (See http://www.malloc.de), which are derived
from versions of this malloc.
I know about it but it does not mean that default C compilers MM mangers
are better. In all tests done so far it looks that they didn't. So far only
the MM in SuseLinux seems to be well scalable. I haven't tested other
Linux distros with multi CPU machine yet.
Hi,
I didn't mean C compilers MM are better. I just proposed to try for
example nedmalloc in MT. Somewhere I've found that libc's malloc is
based on ptmalloc, and nedmalloc claims to be faster than ptmalloc. So,
we can try nedmalloc for tests that gives bad results for dlmalloc.
Best regards,
Mindaugas
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour