I'm working in this mixed environment where I'm on a Windows machine using Simics
and Cygwin
to run some code in a unix like environment. I've been coding in C but I'm interested in trying to do my solution in Python. In the unix environment to find the SC_PAGE_SIZE
you can simply do:
#Python-2.7, unix environment
page_size = os.sysconf("SC_PAGE_SIZE")
If you're coding in c you can do:
#C, unix environment
size_t page_size = (size_t) sysconf (_SC_PAGESIZE);
However when using python in Windows os.sysconf
doesn't exist and I've been unable to find a replacement. What can I use in python to find the PAGE_SIZE
of the environment.
A side note, I know you may wonder why I'm using the setup as it is and it's not my choice. It's an homework assignment from work. The question I'm asking is for my own benefit it's not for the homework.
Try:
import mmap
print mmap.PAGESIZE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With