Memory serialization program for C language