employer cover photo
employer logo
employer logo

Sony Electronics

Fait partie de Sony

Employeur impliqué

Question d’entretien chez Sony Electronics

implement your version of memcpy()

Réponses aux questions d'entretien

Utilisateur anonyme

19 mars 2009

what the interviewee's really wanted to know was your thought process in descrption the implementation, as your write, say what you are thinking in order to get a conversation going w/ the audience. In my case, we ended up on a whole tangent about what if the memory you are trying to copy is already occupied, which led to memmove() which ultimately sparked a conversation among the group, i.e. a more positive engagement versus just going up to the whiteboard in silence.

Utilisateur anonyme

29 mai 2009

It might be good to mention that getting aligned onto native word boundaries and then using the largest native word size for the machine in question to do the transfer would be a good optimization. All real implementations do this. You would have to discuss the edge cases of source vs. dest alignment and dealing with the odd bytes left over.