Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13df76a

Browse files
committed
Introduce dynamic shared memory areas.
Programmers discovered decades ago that it was useful to have a simpleinterface for allocating and freeing memory, which is why malloc() andfree() were invented. Unfortunately, those handy tools don't workwith dynamic shared memory segments because those are specific toPostgreSQL and are not necessarily mapped at the same address in everycooperating process. So invent our own allocator instead. This makesit possible for processes cooperating as part of parallel queryexecution to allocate and free chunks of memory without having toreserve them prior to the start of execution. It could also be usedfor longer lived objects; for example, we could consider storing datafor pg_stat_statements or the stats collector in shared memory usingthese interfaces, rather than writing them to files. Basically,anything that needs shared memory but can't predict in advance howmuch it's going to need might find this useful.Thomas Munro and Robert Haas. The original code (of mine) on whichThomas based his work was actually designed to be a new backend-localmemory allocator for PostgreSQL, but that hasn't gone anywhere - ornot yet, anyway. Thomas took that work and performed majorrefactoring and extensive modifications to make it work with dynamicshared memory, including the addition of appropriate locking.Discussion: CA+TgmobkeWptGwiNa+SGFWsTLzTzD-CeLz0KcE-y6LFgoUus4A@mail.gmail.comDiscussion: CAEepm=1z5WLuNoJ80PaCvz6EtG9dN0j-KuHcHtU6QEfcPP5-qA@mail.gmail.com
1 parent13e14a7 commit13df76a

File tree

4 files changed

+2317
-1
lines changed

4 files changed

+2317
-1
lines changed

‎src/backend/utils/mmgr/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ subdir = src/backend/utils/mmgr
1212
top_builddir = ../../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
OBJS = aset.o freepage.o mcxt.o portalmem.o
15+
OBJS = aset.odsa.ofreepage.o mcxt.o portalmem.o
1616

1717
include$(top_srcdir)/src/backend/common.mk

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp