This code tries to utilize system malloc features and falls back to legacy aligned blocks management code if system malloc implementation is unknown, broken, or lacks aligned allocation routines. It will be great if someone can help to test this on Windows, OSX, old *BSD and other non-GNU/Linux systems; in particular, I believe OSX should have some specific aligned allocation stuff, which I'm not aware about. Dmitry