您的位置:首页 > 其它

【翻译二】其他语言有内存模型吗

2017-03-20 00:00 197 查看
摘要: 翻译第二篇,原文地址http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#otherlanguages

Do other languages, like C++, have a memory model?

Most other programming languages, such as C and C++, were not designed with direct support for multithreading. The protections that these languages offer against the kinds of reorderings that take place in compilers and architectures are heavily dependent on the guarantees provided by the threading libraries used (such as pthreads), the compiler used, and the platform on which the code is run.

其他许多变成语言,比如C和C++,它们并未多线程支持进行设计。为了防止发生在编译器和处理器中的重排序,这些语言也采取了保护措施,但对多线程的保护严重依赖于代码所使用的多线程类库(例如pthread),使用的编译器,以及所处的处理器平台。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐