diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-12-02 11:29:01 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-12-02 11:29:01 -0500 |
commit | fbc1c12a94a638cf4f577fef158175e22ab824a3 (patch) | |
tree | 73c71b1438af7fe8a478bf43f2568e253d14a783 /src/backend/commands/cluster.c | |
parent | e63d41498837667a4e2e0a4b9416bfda28c722d6 (diff) | |
download | postgresql-fbc1c12a94a638cf4f577fef158175e22ab824a3.tar.gz postgresql-fbc1c12a94a638cf4f577fef158175e22ab824a3.zip |
Add a crude facility for dealing with relative pointers.
C doesn't have any sort of built-in understanding of a pointer
relative to some arbitrary base address, but dynamic shared memory
segments can be mapped at different addresses in different processes,
so any sort of shared data structure stored within a dynamic shared
memory segment can't use absolute pointers. We could use something
like Size to represent a relative pointer, but then the compiler
provides no type-checking. Use stupid macro tricks to get some
type-checking.
Patch originally by me. Concept suggested by Andres Freund. Recently
resubmitted as part of Thomas Munro's work on dynamic shared memory
allocation.
Discussion: 20131205144434.GG12398@alap2.anarazel.de
Discussion: CAEepm=1z5WLuNoJ80PaCvz6EtG9dN0j-KuHcHtU6QEfcPP5-qA@mail.gmail.com
Diffstat (limited to 'src/backend/commands/cluster.c')
0 files changed, 0 insertions, 0 deletions