Memsize-type


The term "memsize" is often used in our articles. We introduce this term to simplify description of the material. The term "memsize" has appeared as a try to name briefly all the types which are capable of storing pointers' sizes and indexes of the largest arrays. Memsize-type can store the size of a maximum array which can be theoretically allocated within the framework of the given architecture. By memsize-type we understand all simple data types of C/C++ languages which are 32-bit on a 32-bit architecture and 64-bit on a 64-bit one.

Keep in mind that in different data models the term memsize-type includes different types. For example, in Windows systems long type is not memsize-type and in Unix systems with data model LP64 it is. Examples of memsize-types: pointers, size_t, ptrdiff_t, intptr_t, SIZE_T, DWORD_PTR.

Picture 1

References


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
We use cookies for the analysis of events to improve our content and make user interaction more convenient. By continuing the view of our web-pages you accept the terms of using these files. You can find out more about cookie-files and privacy policy or close the notification, by clicking on the button. Learn More →
Do not show again