The mmalloc package takes a block of memory (that can be shared), and allocates memory out of the block. The package does locking so that it can be used by multiple threads and/or processes at the same time. The locking is done on a fine grain level, so two processes who request different size blocks will not block each other.
I have done extensive testing on a dual processor FreeBSD box with out problems, but my code on a multi-processor IRIX box has problems that I have not been able to track down.