memory allocation usage for pointers