Can we use memset( ) for non-zero initial value?

The memset() function writes bytes, not words. So writing 1 to sizeof(int)*100 bytes writes 00000001 to every set of 8-bits. Thus, each integer in binary looks like the following:-

0000 0001 0000 0001 0000 0001 0000 0001 (1 int = 4 bytes)

which in decimal is, exactly, 16843009.

I’m not sure what the best way to set desired values is. Maybe use memcpy or a small kernel to do it?

Anjul