python - How to determine whether a memory page is mmaped in C -
I would like to know one way to determine whether an indicator is from an MMAPD memory page.
To use msync () on an indicator on StackOverflow it determines whether it passes or not but what I found msync () will be as long as the indicator page size There is a multi, no matter the page or mmaped.
I know the beginning of the page by the macro:
#define align_to_page (addr, pagesize) (& addresses amp; ~ (pagesize - 1)) Please help me, I'm working on it blocking here for a long time and here. Thanks in advance :)
Background: I am developing an extension for Python and Namchi. In some tasks, it is a general numpy.ndarray and a numpy.memmap that is created by mmap to distinguish a subclass of numpy.ndaraay with its data buffer () supported by a file on the disk.
All non-blank process address space mmap ed is either Mmap syscall or indirectly using brk / sbrk through syscalls You might be able to separate another numpy arrays to find the path. The documentation says that these arrays may have extra properties file name , offset and mode You may use it to find out whether an array is supported by the file or not.
Comments
Post a Comment