Relax memory requirements on 64bit platforms; fix two memleaks.