bpo-18049: Sync thread stack size to main thread size on macOS by ronaldoussoren · Pull Request #14748 · python/cpython (original) (raw)

Is MiB something we use elsewhere? I'm probably old, but don't particularly like the MiB vs. MB distinction as it is often clear from the context what's meant.

Well, it's not a big deal, just a remark. I already approved your PR twice ;-) It's up to you.


For MiB, see my PR #4293: "kB (kilo byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate."

And my commit 8c663fd:

commit 8c663fd60ecba9c82aa4c404dbfb1aae69fe8553
Author: Victor Stinner <victor.stinner@gmail.com>
Date:   Wed Nov 8 14:44:44 2017 -0800

    Replace KB unit with KiB (#4293)

5 MB means 5 000 000 bytes, not 5*1024*1024 = 5242880 bytes.

Sadly MB (megabyte) is used instead of MiB in many places (outside Python).

#define THREAD_STACK_SIZE 0x1000000 is 16 MiB ;-)

https://en.wikipedia.org/wiki/Megabyte