Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jan 2004 17:38:28 -0500 (EST)
From:      Anand Subramanian <anand@pythagoras.math.uwaterloo.ca>
To:        freebsd-hackers@freebsd.org
Subject:   mmap() on pseudo device
Message-ID:  <Pine.GSO.4.58.0401191737400.22957@pythagoras.math.uwaterloo.ca>

next in thread | raw e-mail | index | archive | help
Hi,
I am trying to share some memory between a networking daemon and the
FreeBSD 5.1 kernel. I am trying to implement the shared memory using a
pseudo-device via the make_dev() call. "mknod" at the command line prompt
no longer seems to work(no longer supported because of the devfs
interface? - it would be great if anyone could confirm this).


My questions :

1. I'm creating a pseudo device and having a user space process mmap() the
device memory into its address space. So the mmap for the device has to be
implemented. Are there any useful driver/source files I could look at for
this?

2. How can I access the mmaped memory from another kernel loadable module?

3. For the user space program, after it does a mmap() on the
pseudo-device, is there any way it can force malloc() to operate on the
mmaped memory? Or am I forced to write my own lightweight memory manager?
Most of the memory managers around seem to be way too complicated to
quickly fix or customize for a simple need.


TIA,


            Anand



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.58.0401191737400.22957>