jvs@micas.UUCP (Jo stockley) (08/04/87)
I am trying to find out what the maximum size of space one can map in
to users address space using the mmap call.
The problem is this, we have a device that contains 4Mb of memory
which is mapped onto the vme32d16 space in a Sun 3/160M running 3.2
Sun unix. I have written a driver that supports various ioctls and the
mmap call.
What I need to find out is how many of these devices can I put
on my machine. I know the physical limitations like number of slots
etc. The effect upon the operation of UNIX does not matter at this
stage of the game.
I have written a simple test program that opens /dev/vme32d16
and then mmaps in 4Mb at an offset given by the user. It then simply
sleeps. I have set up several copies of this all running in the
background with offsets 4Mb apart (0x800000, 0xC00000 etc).
The system seems quite happy to let me do this until I run out of
swap space to valloc 4Mb, which happens after about the 10th
invocation of my program in the loop. This I can appreciate (we only
have a 16 Mb swap).
A little bird told me that it was possible to mmap up to 128Mb
(subject to swap availability for valloc) in one go but neglected to
say if this was true on all Sun 3's (he also said that it was in fact
possible to do DVMA by some trickery using mmap but gave no further
details).
Can any of you Sun guru's out there give any info on this as it
is causing me some grief (we have someone who wants to put at least 4
of these jobbies on a Sun 3/180).
You can either e-mail me or post replies, either will be much
appreciated.
-------------
Jo. Stockley. (jvs@micas.uucp or ...!mcvax!ukc!micas!jvs)
Nodecrest Computer Systems Ltd
Byfleet, UK.
Phone: +44 09323 40555