python3 和 python3m 可执行文件的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16675865/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 23:20:45  来源:igfitidea点击:

Difference between python3 and python3m executables

pythonpython-3.x

提问by James Mishra

What is the difference between the /usr/bin/python3and /usr/bin/python3mexecutibles?

是什么之间的区别/usr/bin/python3/usr/bin/python3mexecutibles?

I am observing them on Ubuntu 13.04, but Google suggests that they exist on other distributions too.

我在 Ubuntu 13.04 上观察它们,但谷歌建议它们也存在于其他发行版中。

The two files have the same md5sum, but do not seem to be symbolic links or hard links; the two files have different inode numbers returned by ls -liand testing find -xdev -samefile /usr/bin/python3.3does not return any other files.

这两个文件的md5sum是一样的,但是好像不是符号链接或者硬链接;这两个文件具有不同的 inode 编号,ls -li并且测试find -xdev -samefile /usr/bin/python3.3不返回任何其他文件。

Someone asked a similar question on AskUbuntu, but I wanted to find out more about the difference between the two files.

有人在 AskUbuntu 上提出了类似的问题,但我想更多地了解这两个文件之间的区别。

采纳答案by James Mishra

Credit for this goes to chepnerfor pointing out that I already had the link to the solution.

这要归功于 chepner指出我已经有了解决方案的链接。

Python implementations MAY include additional flags in the file name tag as appropriate. For example, on POSIX systems these flags will also contribute to the file name:

--with-pydebug (flag: d)

--with-pymalloc (flag: m)

--with-wide-unicode (flag: u)

Python 实现可以根据需要在文件名标签中包含额外的标志。例如,在 POSIX 系统上,这些标志也会影响文件名:

--with-pydebug(标志:d)

--with-pymalloc(标志:m)

--with-wide-unicode(标志:u)

via PEP 3149.

通过PEP 3149

Regarding the mflag specifically, this is what Pymalloc is:

m特别是关于标志,这就是 Pymalloc 是什么:

Pymalloc, a specialized object allocator written by Vladimir Marangozov, was a feature added to Python 2.1. Pymalloc is intended to be faster than the system malloc() and to have less memory overhead for allocation patterns typical of Python programs. The allocator uses C's malloc() function to get large pools of memory and then fulfills smaller memory requests from these pools.

Pymalloc 是 Vladimir Marangozov 编写的专门对象分配器,是 Python 2.1 中添加的一项功能。Pymalloc 旨在比系统 malloc() 更快,并且对于 Python 程序典型的分配模式具有更少的内存开销。分配器使用 C 的 malloc() 函数来获取大型内存池,然后满足来自这些池的较小内存请求。

via What's New in Python 2.3

通过Python 2.3 的新增功能

Finally, the two files may be hardlinked on some systems. While the two files have different inode numbers on my Ubuntu 13.04 system (thus are different files), a comp.lang.python post from two years agoshows that they once were hardlinked.

最后,这两个文件在某些​​系统上可能是硬链接的。虽然这两个文件在我的 Ubuntu 13.04 系统上具有不同的 inode 编号(因此是不同的文件),但两年前的一篇comp.lang.python 帖子显示它们曾经是硬链接的。