Ios Memory Allocation

Source: Internet
Author: User

Memory partition:

1) stack: the stack zone is automatically allocated and released by the compiler, and stores the parameter values of functions and the values of local variables. The operation method is similar to the stack in the data structure.
2) heap-generally assigned and released by the programmer. If the programmer does not release the heap, it may be recycled by the OS at the end of the program. (In ios, alloc is stored in the heap)
3) Global (static)-the storage of global and static variables is placed in one area, and the initialized global and static variables are in one area, uninitialized global variables and uninitialized static variables are in another adjacent area. -The system is released after the program ends. Note: Global zones can be divided into uninitialized global zones:. bss segments and initialized global zones: data segments.
4). The constant zone-constant string is placed here. The program is released by the System
5). Code area-stores the binary code of the function body.

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.