Ssize_t and size_t-linux

Source: Internet
Author: User
Ssize_t and size_t-linuxssize_t: signedsize_t [Note: signed] size_t: defined in the standard C library, should be unsignedint [Note: unsigned] I. size_t enhanced portability: [note: size_t may be different in different systems... ssize_t and size_t-linux
Ssize_t: signed size_t [Note: signed] size_t: defined in the standard C library, should be unsigned int [Note: unsigned] I. size_t enhanced portability: [note: size_t may be defined differently on different systems, and it is defined to facilitate inter-system transplantation.] on 32-bit systems: it is defined as unsigned int, that is, on a 32-bit 32-bit unsigned integer 64-bit system: it is defined as unsigned long, that is to say, it is a 64-bit unsigned integer on a 64-bit system 2. size_t count: the number of things to be copied. for example, the result type of the sizeof operator is size_t. This type ensures that it can accommodate the maximum object size. An unsigned integer that is suitable for measuring the number of data items that can be accommodated in the memory. It is widely used in array subscript and memory management functions. 3. the size of the data block in which ssize_t performs read/write operations is similar to that in size_t, but must be signed. Therefore: it indicates the signed size_t type.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.