The GNU library typically uses Posix threads to implement the standard thread library. This uses one pthread_mutex_t type to represent several different types of mutexes; therefore, it contains various fields necessary for more complex mutexes (for example, a counter for recursive mutexes), plus a field for specifying the type.
You are right that, in principle, with suitable support from the operating system, std::mutex can use only one byte of user memory. (On Linux, it must be int , but on other platforms, it can be an integer or pointer size for a kernel resource). Presumably, the benefits of using a well-tested existing implementation were considered to outweigh the benefits of storing several tens of bytes per mutex.
source share