An advanced function that offers in-place expansion shrink to fit and new allocation capabilities. Memory allocated with this function can only be deallocated with deallocate() or deallocate_many(). This function is available only with Version == 2
| 222 | //!or deallocate_many(). |
| 223 | //!This function is available only with Version == 2 |
| 224 | pointer allocation_command(allocation_type command, |
| 225 | size_type limit_size, |
| 226 | size_type &prefer_in_recvd_out_size, |
| 227 | pointer &reuse) |
| 228 | { |
| 229 | BOOST_STATIC_ASSERT(( Version > 1 )); |
| 230 | const allocation_type mask(AllocationDisableMask); |
| 231 | command &= ~mask; |
| 232 | pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); |
| 233 | if(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION)) |
| 234 | boost::container::throw_bad_alloc(); |
| 235 | return ret; |
| 236 | } |
| 237 | |
| 238 | //!Returns maximum the number of objects the previously allocated memory |
| 239 | //!pointed by p can hold. |
no test coverage detected