mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Deque capacity always is power of 2 and can decrease.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339769 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
73026aaaf8
commit
929eac47a0
1 changed files with 8 additions and 7 deletions
|
@ -14,10 +14,10 @@
|
|||
<methodparam><type>int</type><parameter>capacity</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Ensures that enough memory is allocated for a required capacity.
|
||||
This removes the need to reallocate the internal as values are added.
|
||||
Ensures that enough memory is allocated for a required capacity.
|
||||
This removes the need to reallocate the internal as values are added.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
|
@ -29,10 +29,11 @@
|
|||
The number of values for which capacity should be allocated.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Capacity will stay the same if this value is less than or equal to the
|
||||
current capacity.
|
||||
</para>
|
||||
<para>
|
||||
Capacity will always be rounded up to the nearest power of 2.
|
||||
Capacity will be halved if element count drops below a quarter of
|
||||
current capacity.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
Loading…
Reference in a new issue