home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!psgrain!neon!pail!servio!chrisp
- From: chrisp@slc.com (Chris Pinkham)
- Subject: choosing shared memory addresses
- Message-ID: <1993Jan5.004036.4263@slc.com>
- Organization: Servio Corp, Beaverton Oregon, US
- Date: Tue, 5 Jan 1993 00:40:36 GMT
- Lines: 15
-
- Say I want to attach to a large shared memory segment, and I need it to be
- aligned across some arbitrary page boundary (i.e. the starting address needs
- to be a multiple of this arbitrary page size, where the page size will always
- be a multiple of the OS page size). How would I go about ensuring that the
- address I pick will work? I assume that arbitrarily picking an address would
- be a bad idea, and may fail depending on what other data is using that address
- space.
-
- What problems would I bump into by rounding an OS nominated address up by
- (address % MY_PAGE_SIZE) bytes? Is there a chance that that would screw up
- something at the end of the shared memory segment (i.e. if the OS placed the
- segment of size s at a, and I want it to be at a+x, how do I know whether
- someone else already occupies the space at a+x+s)?
-
- Are there any foolproof tricks out there? Am I being paranoid?
-