﻿# Memsize\-type

The term "memsize" is often used in [our articles](https://pvs-studio.com/en/blog/posts/)\. 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](https://pvs-studio.com/en/blog/terms/0012/) 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](https://pvs-studio.com/en/blog/terms/0028/) it is\. Examples of memsize\-types: pointers, [size\_t](https://pvs-studio.com/en/blog/terms/0044/), [ptrdiff\_t](https://pvs-studio.com/en/blog/terms/0041/), [intptr\_t](https://pvs-studio.com/en/blog/terms/0023/), SIZE\_T, DWORD\_PTR\.

![Memsize-type/image1.png](https://import.viva64.com/docx/blog/Memsize-type/image1.png)

## References

1. Andrey Karpov\. [About size\_t and ptrdiff\_t](https://pvs-studio.com/en/blog/posts/cpp/a0050/)\.
1. MSDN\. Standard Types\. [https://msdn\.microsoft\.com/en\-us/library/323b6b3k\.aspx](https://msdn.microsoft.com/en-us/library/323b6b3k.aspx)
1. MSDN\. Windows Data Types\. [https://msdn\.microsoft\.com/en\-us/library/aa383751\(VS\.85\)\.aspx](https://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx)