Hi every one,
I would like to get physical address of share memory. My code likes this:
- Create a share memory using shm_open();
- Using shm_ctl() to set attribute of that share memory
- Map memory object by mmap();
- Get physical address of this memory by mem_offset();
My problem is that, the physical address is not align to the size of memory. How can I align this physical address?
For example:
- memsize = 4KBytes, the physical address must be multiples of 0x1000
- memsize = 8MBytes, the physical address must be multiples of 0x800000
Thanks.
Zodiac