I know that malloc for pointers to get a place in mamory but how does it work?