fixed code in memory_routines.c and got rid of compile warnings from memory_mapingc