Add custom malloc/free feature.