[prev in list] [next in list] [prev in thread] [next in thread]
List: zebra
Subject: [zebra 18043] Re: how to mapping a virtual memory address in user space to kernel space(linux)
From: "john smith" <johnsmith0302 () hotmail ! com>
Date: 2003-02-24 18:56:09
[Download RAW message or body]
try a man on shmget() and shmat() if you are willing to replace malloc() by
shmget()
the shmat() attaches a pointer to the memory address of the shared memory
so you could try shmid= shmget(...)
and ptr=shmat(...)
that pointer should point to a space in virt address space that maps to a
real meomry address space.
----- Original Message -----
From: jiafenggen <jfg@mail.ndsc.com.cn>
To: <zebra@zebra.org>
Sent: Monday, February 24, 2003 5:48 PM
Subject: [zebra 18038] Re: how to mapping a virtual memory address in user
space to kernel space(linux)
> dear all:
>
> I am Under Linux-2.4.7 , I want to finish the following thing:
>
> first call the function Malloc to allocate a block of memory in user
space, and then I want to map the returning vitrual memory address into a
physical address ,the result i want to get is that i can use that block of
memory in kernel programming , what shall i do?
> Thanks!
>
>
>
>
> >> Dear all,
> >>
> >> I now have a question is how to mapping a virtual memory address in
> >> user space to a physical address in kernel space?
> >>
> >
> >Interesting request. Which OS?
> >
> >btw, the next step might the virtual memory to physical. under linux most
of
> >the time, phys = virt & 0x00ffffff which can be useful for various
things.
> >
> >> Thanks.
>
>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic