Check if memory is set when setting mlockall
Only set allocated_memory attr if node[:memory] is defined