ftw@datacube.UUCP (11/19/87)
/* 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 */