[#BloombergLP-ball-LoggerManager-obtainMessageBuffer-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]::obtainMessageBuffer :relfileprefix: ../../../ :mrdocs: `obtainMessageBuffer` overloads == Synopses Declared in `<ball_loggermanager.h>` Return a managed pointer that refers to the memory block to which this thread of execution has exclusive access and load the size (in bytes) of this buffer into the specified `bufferSize` address. Note that this method is intended for _internal_ _use_ only. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[bslma::ManagedPtr<char>] xref:BloombergLP/ball/LoggerManager/obtainMessageBuffer-06.adoc[obtainMessageBuffer](int* bufferSize); ---- [.small]#xref:BloombergLP/ball/LoggerManager/obtainMessageBuffer-06.adoc[_» more..._]# Block until access to the static buffer used for formatting messages is available. Return the address of the modifiable buffer to which this thread of execution has exclusive access, load the address of the mutex that protects the buffer into the specified `*mutex` address, and load the size (in bytes) of the buffer into the specified `bufferSize` address. The address remains valid, and the buffer remains locked by this thread of execution, this thread calls `mutex‐>unlock()`. The behavior is undefined if this thread of execution currently holds a lock on the buffer. Note that the buffer is intended to be used _only_ for formatting log messages immediately before calling `logMessage`; other use may adversely affect performance for the entire program. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/ball/LoggerManager/obtainMessageBuffer-0c.adoc[obtainMessageBuffer]( xref:BloombergLP/bslmt/Mutex.adoc[bslmt::Mutex]** mutex, int* bufferSize); ---- [.small]#xref:BloombergLP/ball/LoggerManager/obtainMessageBuffer-0c.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#