[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tracking adresses of write and read
On Wed, 16 May 2001 15:24:05 +0200
Erik Mouw <J.A.K.Mouw@ITS.TUDelft.NL> wrote:
> > I would like to be abble to see which physical adress i'm
> > writing/reading to when I write/read in the mmap-ed memory.
> >
> > Who could i do this?
>
> My guess:
>
> unsigned long phys_addr;
>
> phys_addr = virt_to_phys(virtual_address);
> printk(KERN_INFO "%s: phys_addr = 0x%08x\n", __FUNCTION__, phys_addr);
Err.. Can I do this in the user space program??? That's where i'm doing
the reads/writes
I think both virt_to_phys and printk are kernel functions, not syscall
or libc function.
Thanks,
--
Fabrice Gautier <gautier@email.enstfr>
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/