FIND SIZE OF MEMORY ALLOCATE???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2002-03-02, Guy Fraser wrote:

:I think that what you are looking for is "sizemem = strlen( ptr ) + 1;" 
:this will
:return the number of characters where "sizeof( char )" is usualy one 
:byte plus an
:extra byte to account for the required NULL terminator.

strlen() would stop at the first \0 character, because zero is the C
string delimiter. So, that won't work.





[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux