fixed proc_memory allocation madness