Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cca!mirror!datacube!ftw From: ftw@datacube.UUCP Newsgroups: comp.sys.m68k Subject: Motorola shared memory questions Message-ID: <105700006@datacube> Date: Thu, 19-Nov-87 15:51:00 EST Article-I.D.: datacube.105700006 Posted: Thu Nov 19 15:51:00 1987 Date-Received: Sun, 22-Nov-87 16:25:04 EST Lines: 32 Nf-ID: #N:datacube:105700006:000:1590 Nf-From: datacube.UUCP!ftw Nov 19 15:51:00 1987 /* Written 3:48 pm Nov 19, 1987 by ftw@datacube.UUCP in datacube:comp.unix.wizards */ /* ---------- "Motorola shared memory questions" ---------- */ Anyone out there have experience with shared memory in Sys V.3? I'm porting a driver from a Sun 3 environment, and one of the requirements is that a large chunk of physical address space be mapped into a users' virtual address space. This range of address may not swapped or cached. In Sun land, the driver did this by calling valloc(), and passing the pointer returned by valloc() to a function that calls mmap() enough times to get all the addresses mapped. In Motorola's Sys V port, they have added extensions to the shmget() function that allows physical addresses to be mapped. The default parameters for my system allow up to 128K bytes to be bought per-call. I need more space than this, so I call shmget() more than once, and I call shmat() to get back the corresponding virtual addresses. The addresses that come out of shmat() result in a non-contiguous virtual address space. I really need it to be contiguous. The second argument to shmat() can be NULL, or a valid user virtual address. I've tried buying memory with malloc() and passing that pointer to shmat, but I always get EINVAL from shmat(). Any Motorola Sys V gurus out there? Farrell T. Woods Datacube Inc. Systems / Software Group 4 Dearborn Rd. Peabody, Ma 01960 VOICE: 617-535-6644; FAX: (617) 535-5643; TWX: (710) 347-0125 INTERNET: ftw@datacube.COM UUCP: {rutgers, ihnp4, mirror}!datacube!ftw /* End of text from datacube:comp.unix.wizards */