shared memory??

John Chapman chapman at fornax.UUCP
Tue Mar 22 19:10:12 AEST 1988


In article <183 at sdeggo.UUCP>, dave at sdeggo.UUCP (David L. Smith) writes:
> In article <259 at bby-bc.UUCP>, john at bby-bc.UUCP (john) writes:
> > I'm trying to use shared memory to access a frame buffer and it
> > doesn't seem to work. I am running 2.2L.  I put the appropriate
.
.
.
> > "A"'s to the herc. mono adapter.  The program runs in a couple of seconds
> > but nothing changes on the screens.  The only thing I have noticed is
> > that in  system5.nm  shmat() is listed as an int rather than a char *
> 
> Well, your program is correct, I compiled and ran it on 'eggo without any
> problems (well, it gives a core dump at the end, but that's not your problem
> just yet).

Hmmmm, I don't have around anymore but I don't remember it core dumping....
 
> There's two things to check for:  On older version of 2.2, the shmcreate
> program did not attach the segments properly.  You can check to see if

This was my problem - Harold Walters (walters at ce.okstate.edu) sent me
some routines he had for accessing the ega in which he mentioned a patch
I tracked down the patch to /etc/shmcreate, applied it, and now everything
works like a charm.  For large chunks of memory (being moved to/from the
targa frame buffer) it was actually slower than using /dev/mem. I looked at the
code produced by cc for
	for (; n>0 ; n-- ) *dst++ = *src++;
and it was pretty bad even using cc -O.  I replaced the code by a
	mov n,%cx
	rep
	smov

and now everthing is much faster.  In the 2.2 man page it says /etc/shmcreate
is only a temporary solution for graphics and it can be expected to go
away - don't get rid of it Microport!! If you have something better for
graphics that is great - but leave shmcreate around, it's extremely useful
for doing oddball things in a reasonably efficient way.

john
 .....!ubc-vision!fornax!bby-bc!john
 



More information about the Comp.unix.microport mailing list