I have a text file (or jpg photo) in android, which is essentially a modified linux system (I have some experience writing native C code in android using NDK). I simply want to find the physical memory address for the start of this file/photo. So get a return value of something like: 0x9abcdef0. My understanding is that files/photos are stored somewhere on physical memory address space, if this assumption is wrong, let me know.
I have looked into calls such as mmap, and couple of SO posts, but they don't really do what I want, which is just return the address. I also don't need functions like open() or file descriptor related stuff, looking to get that lower level real address.
How to access physical addresses from user space in Linux?
linux kernel - how to get physical address (memory management)?