char memory allocation