C++ Logo

std-discussion

Advanced search

Guaranteed size of binary semaphore?

From: KL <deco33000_at_[hidden]>
Date: Thu, 31 Mar 2022 20:00:41 +0200
Hi,

I measured the size of a binary semaphore.
https://en.cppreference.com/w/cpp/thread/counting_semaphore

I found 4 bytes, the size of an int32_t on a 64 bit system.

I need your confirmation that this size won't vary in the future and that it is not implementation defined.

I rely on that inside a mmap structure that won't be touched later. Arch: amd64.

Thanks

--

Received on 2022-03-31 18:00:44