Path: utzoo!attcan!uunet!mcsun!hp4nl!orcenl!bengsig From: bengsig@oracle.nl (Bjorn Engsig) Newsgroups: comp.unix.aix Subject: Re: Shared Memory for Executable Keywords: shared memory executable Message-ID: <1013@nlsun1.oracle.nl> Date: 10 Oct 90 09:35:10 GMT References: <1990Oct9.183417.7529@eplrx7.uucp> Reply-To: bengsig@oracle.nl (Bjorn Engsig) Organization: Oracle Europe, The Netherlands Lines: 20 Article <1990Oct9.183417.7529@eplrx7.uucp> by mroz@eplrx7.uucp (Peter Mroz) says: |We are using a program that takes up about 5MB of memory, and were wondering |about the possibility of putting it into a shared memory space. If the memory you want to share is code, this is done for you by default. If you want to share data, it's a bit more tricky. - You can use the shmat, shmget, etc. calls, but it will require you to restructure your code, and you have to load your data into your shm yourself. - String literals (at least in C programs) are by default put into shared memory together with code. - Declaring vraibles as const doesn't do it. -- Bjorn Engsig, E-mail: bengsig@oracle.com, bengsig@oracle.nl ORACLE Corporation From IBM: auschs!ibmaus!cs.utexas.edu!uunet!oracle!bengsig "Stepping in others footsteps, doesn't bring you ahead"