Skip site navigation (1) Skip section navigation (2)

Re: sysv_shmem potential problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lsunley(at)mb(dot)sympatico(dot)ca
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: sysv_shmem potential problem
Date: 2004-12-31 20:53:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
lsunley(at)mb(dot)sympatico(dot)ca writes:
> I am using the sysv_shmem.c shared memory allocation api for os/2 and I
> ran into a problem when OS/2 allocates shared memory over the 2 gigabyte
> address boundary.

> The existing sysv_shmem.c tests for the return address of the segment as
> less than 0 and determines that a negative indicates an error.

shmget returns an ID, not an address.  I quote from the Single Unix

  Upon successful completion, shmget() returns a non-negative integer,
  namely a shared memory identifier; otherwise, it returns -1 and errno
  will be set to indicate the error.

While your change might be harmless, it should not be necessary, and it
certainly shouldn't have anything to do with 2gig address boundaries.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Michael FuhrDate: 2004-12-31 22:44:00
Subject: Re: exception handling in plpgsql
Previous:From: Andrew DunstanDate: 2004-12-31 20:18:39
Subject: Re: exception handling in plpgsql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group