basicaly malloc function requires the amount of memory that you are requesting for.ofcourse one can easily write "2" instead of sizeof(int).
But it will not be smart programming since on different...