简体   繁体   English

uint64_t在32位机器上写入

[英]uint64_t writes in 32 bit machine

When 2 process communicating via shared memory on 32 bit solaris i386 Arch 当2进程通过共享内存在32位solaris i386 Arch上进行通信时

  1. Is it guaranteed that for the value of uint64_t datatype, ( value < 2^32 ) is written in single memory location and ( value > 2^32 ) is written in 2 memory location? 是否保证对于uint64_t数据类型的值,( 值<2 ^ 32 )写入单个内存位置并且( 值> 2 ^ 32 )写入2个内存位置?
  2. Is the 32 bit memory read is atomic.? 32位内存读取是否是原子的。?

A 64-bit value is always written into 64 bits of memory! 64位值始终写入64位内存! 1 The write is almost certainly not atomic (unless the architecture explicitly guarantees this). 1写几乎肯定不是原子的(除非架构明确地保证了这一点)。


1. Except, of course, when it's not written to memory at all (ie when there's no register spill . But that's beside the point. 1.当然,除非它根本没有写入记忆(即当没有寄存器溢出时 。但这不是重点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在32位应用程序中使用uint64_t - Using uint64_t in 32 bit application 为什么在 64 位机器上使用 uint8_t 编写的这段代码比使用 uint32_t 或 uint64_t 编写的类似代码运行得更快? - Why does this piece of code written using uint8_t run faster than analogous code written with uint32_t or uint64_t on a 64bit machine? std::bitset&lt;64&gt; 是否适用于 uint64_t 的 32 位机器? - Does std::bitset<64> work on 32 bit machines for uint64_t? 将包含 32 位值的 uint64_t 传递给参数实际上是 uint32_t 的外部 function 是否安全? - Is it safe to pass a uint64_t containing a 32-bit value to an external function whose parameter is actually a uint32_t? uint64_t的未定义高阶,同时移位和屏蔽32位值 - Undefined high-order of uint64_t while shifting and masking 32-bit values 在x86机器上移位超过32位的uint64_t整数未定义的行为? - Is Shifting more than 32 bits of a uint64_t integer on an x86 machine Undefined Behavior? 将两个 uint32_t 转换为 uint64_t,然后根据位模式而不是值转换回 double - Turn two uint32_t into a uint64_t, then turn back into a double based on the bit pattern not the value int32_t 到 uint64_t 转换的顺序 - Order of int32_t to uint64_t casting uint64_t或std :: bitset上的位操作 - Bit manipulation on uint64_t or std::bitset 如何在uint64_t中移位&gt; = 32位? - How to shift >= 32 bits in uint64_t?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM