Add missing function attributes to functions in memory.h #806