* init shmem early to avoid possible crash * fix_code_style * Keep the initialziation to NULL, remove the duplicate memory allocation