[#BloombergLP-bslma-Allocator-do_allocate] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/Allocator.adoc[Allocator]::do_allocate :relfileprefix: ../../../ :mrdocs: Return a newly allocated block of memory of (at least) the specified positive `bytes` and having at least the specified `alignment`. Unless overriden in a derived class, the return value is `this‐>allocate(bytes)`. If this allocator cannot return the requested number of bytes or cannot satisfy the alignment request, then it will throw a `std::bad_alloc` exception in an exception‐enabled build, or else will abort the program in a non‐exception build. Unless overriden in a derived class, this function will forward the allocation request to the `allocate` virtual function, padding `bytes` and adjusting the return value as necessary to ensure sufficient alignment. Note that if `bytes` is `0`, the same non‐null value will be returned every time. == Synopsis Declared in `<bslma_allocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual void* do_allocate( std::size_t bytes, std::size_t alignment) override; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#