diff options
Diffstat (limited to 'src/backend/port/sysv_shmem.c')
-rw-r--r-- | src/backend/port/sysv_shmem.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 3f31f21d8e6..b7829d7c8c4 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -10,7 +10,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.13 2003/07/27 21:49:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.14 2003/08/04 00:43:21 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -40,13 +40,13 @@ typedef int IpcMemoryId; /* shared memory ID returned by shmget(2) */ IpcMemoryKey UsedShmemSegID = 0; -void *UsedShmemSegAddr = NULL; +void *UsedShmemSegAddr = NULL; static void *InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size); static void IpcMemoryDetach(int status, Datum shmaddr); static void IpcMemoryDelete(int status, Datum shmId); static PGShmemHeader *PGSharedMemoryAttach(IpcMemoryKey key, - IpcMemoryId *shmid); + IpcMemoryId *shmid); /* @@ -90,15 +90,15 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size) */ ereport(FATAL, (errmsg("could not create shared memory segment: %m"), - errdetail("Failed syscall was shmget(key=%d, size=%u, 0%o).", - (int) memKey, size, - IPC_CREAT | IPC_EXCL | IPCProtection), + errdetail("Failed syscall was shmget(key=%d, size=%u, 0%o).", + (int) memKey, size, + IPC_CREAT | IPC_EXCL | IPCProtection), (errno == EINVAL) ? errhint("This error usually means that PostgreSQL's request for a shared memory " "segment exceeded your kernel's SHMMAX parameter. You can either " "reduce the request size or reconfigure the kernel with larger SHMMAX. " - "To reduce the request size (currently %u bytes), reduce " - "PostgreSQL's shared_buffers parameter (currently %d) and/or " + "To reduce the request size (currently %u bytes), reduce " + "PostgreSQL's shared_buffers parameter (currently %d) and/or " "its max_connections parameter (currently %d).\n" "If the request size is already small, it's possible that it is less than " "your kernel's SHMMIN parameter, in which case raising the request size or " @@ -108,9 +108,9 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size) size, NBuffers, MaxBackends) : 0, (errno == ENOMEM) ? errhint("This error usually means that PostgreSQL's request for a shared " - "memory segment exceeded available memory or swap space. " - "To reduce the request size (currently %u bytes), reduce " - "PostgreSQL's shared_buffers parameter (currently %d) and/or " + "memory segment exceeded available memory or swap space. " + "To reduce the request size (currently %u bytes), reduce " + "PostgreSQL's shared_buffers parameter (currently %d) and/or " "its max_connections parameter (currently %d).\n" "The PostgreSQL documentation contains more information about shared " "memory configuration.", @@ -120,9 +120,9 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size) "It occurs either if all available shared memory IDs have been taken, " "in which case you need to raise the SHMMNI parameter in your kernel, " "or because the system's overall limit for shared memory has been " - "reached. If you cannot increase the shared memory limit, " - "reduce PostgreSQL's shared memory request (currently %u bytes), " - "by reducing its shared_buffers parameter (currently %d) and/or " + "reached. If you cannot increase the shared memory limit, " + "reduce PostgreSQL's shared memory request (currently %u bytes), " + "by reducing its shared_buffers parameter (currently %d) and/or " "its max_connections parameter (currently %d).\n" "The PostgreSQL documentation contains more information about shared " "memory configuration.", @@ -326,13 +326,13 @@ PGSharedMemoryCreate(uint32 size, bool makePrivate, int port) hdr->totalsize = size; hdr->freeoffset = MAXALIGN(sizeof(PGShmemHeader)); - + if (ExecBackend && UsedShmemSegAddr == NULL && !makePrivate) { UsedShmemSegAddr = memAddress; UsedShmemSegID = NextShmemSegID; } - + return hdr; } @@ -353,7 +353,7 @@ PGSharedMemoryAttach(IpcMemoryKey key, IpcMemoryId *shmid) hdr = (PGShmemHeader *) shmat(*shmid, UsedShmemSegAddr, #if defined(solaris) && defined(__sparc__) - /* use intimate shared memory on Solaris */ + /* use intimate shared memory on Solaris */ SHM_SHARE_MMU #else 0 |