aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-07-04 15:16:34 +1200
committerThomas Munro <tmunro@postgresql.org>2023-07-04 15:21:36 +1200
commitaf8f9ec66bd19a920d02b4c0eb65b3dd6057d324 (patch)
treeb7a3dc5945cc2fa2bfeb7dc5b8e1e30d93c8550c /src/backend/jit/llvm/llvmjit.c
parent12529028a4e55eb0500477d2589eec625466facf (diff)
downloadpostgresql-af8f9ec66bd19a920d02b4c0eb65b3dd6057d324.tar.gz
postgresql-af8f9ec66bd19a920d02b4c0eb65b3dd6057d324.zip
Re-bin segment when memory pages are freed.
It's OK to be lazy about re-binning memory segments when allocating, because that can only leave segments in a bin that's too high. We'll search higher bins if necessary while allocating next time, and also eventually re-bin, so no memory can become unreachable that way. However, when freeing memory, the largest contiguous range of free pages might go up, so we should re-bin eagerly to make sure we don't leave the segment in a bin that is too low for get_best_segment() to find. The re-binning code is moved into a function of its own, so it can be called whenever free pages are returned to the segment's free page map. Back-patch to all supported releases. Author: Dongming Liu <ldming101@gmail.com> Reviewed-by: Robert Haas <robertmhaas@gmail.com> (earlier version) Reviewed-by: Thomas Munro <thomas.munro@gmail.com> Discussion: https://postgr.es/m/CAL1p7e8LzB2LSeAXo2pXCW4%2BRya9s0sJ3G_ReKOU%3DAjSUWjHWQ%40mail.gmail.com
Diffstat (limited to 'src/backend/jit/llvm/llvmjit.c')
0 files changed, 0 insertions, 0 deletions