Fabien,
memset() writes memory that has been allocated. It is sometimes used to initialize memory for a variety of purposes. It is sometimes used to clear a structure which is passed by reference for the purposes of returning data to the caller (for example, see shmctl(), semctl(), etc)...