Portal:Computer programming/Selected article/3: Difference between revisions

Content deleted Content added
Create
 
Allocators
 
(2 intermediate revisions by the same user not shown)
Line 1:
In [[C++]] [[computer programming]], '''allocators''' are an important component of the [[C++ Standard Library]]. The standard [[software library|library]] provides several [[data structures]], such as [[list (computing)|list]] and [[Set (computer science)|set]], commonly referred to as [[container (data structure)|containers]]. A common trait among these containers is their ability to change size during the [[Run time (program lifecycle phase)|execution]] of the [[computer program|program]]. To achieve this, some form of [[dynamic memory allocation]] is usually required. Allocators handle all the requests for [[Manual memory management|allocation and deallocation]] of memory for a given container. The C++ Standard Library provides general-purpose allocators that are used by default, however, custom allocators may also be supplied by the [[programmer]].<noinclude>
A '''computer program''' (also '''[[computer software|software]]''', or just a '''program''') is a [[sequence]] of [[instruction (computer science)|instructions]] written to perform a specified task with a [[computer]]. A computer requires programs to function, typically [[execution (computing)|executing]] the program's instructions in a [[central processing unit|central processor]]. The program has an [[execution (computing)|executable]] form that the computer can use directly to execute the instructions. The same program in its human-readable [[source code]] form, from which [[executable]] programs are derived (e.g., [[compiler|compiled]]), enables a [[programmer]] to study and develop its [[algorithm#Formalization|algorithms]].<noinclude>
 
{{CC-notice|cc=bysa3|url=http://en.wikipedia.org/w/index.php?title=Computer_programAllocator_%28C%2B%2B%29&oldid=467284416466177763}}