switched back to using gnu malloc, because it seems that the os malloc does not work...