Some questions about memory allocation