From 929eac47a05565dc32539548c4f269a6ca843024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Ferreira=20da=20Silva=20Bacci?= Date: Tue, 2 Aug 2016 22:53:08 +0000 Subject: [PATCH] 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 --- reference/ds/ds/deque/allocate.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/reference/ds/ds/deque/allocate.xml b/reference/ds/ds/deque/allocate.xml index 5027fb7b8f..893de1116b 100644 --- a/reference/ds/ds/deque/allocate.xml +++ b/reference/ds/ds/deque/allocate.xml @@ -14,10 +14,10 @@ intcapacity - 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. - + &reftitle.parameters; @@ -29,10 +29,11 @@ The number of values for which capacity should be allocated. - - Capacity will stay the same if this value is less than or equal to the - current capacity. - + + 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. +