🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.wizards
1 messages
1 total messages Started by Chris Pinkham Tue, 05 Jan 1993 00:40
choosing shared memory addresses
#6976
Author: Chris Pinkham
Date: Tue, 05 Jan 1993 00:40
15 lines
1205 bytes
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?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads