From 316732f4b0f853394085ee2355b3b9b19f04f68f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Jan 2023 06:21:35 +0000 Subject: httpd: add notes about arenas and object heaps We don't users being confused if an innocuous-looking line of code allocates unnexpectedly large values. --- ext/mwrap/httpd.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/mwrap/httpd.h b/ext/mwrap/httpd.h index 17fb187..fe4fe2f 100644 --- a/ext/mwrap/httpd.h +++ b/ext/mwrap/httpd.h @@ -600,7 +600,12 @@ static enum mw_qev each_at(struct mw_h1 *h1, struct mw_h1req *h1r) size, h->as.live.gen, h->real); } rcu_read_unlock(); - FPUTS("", fp); + FPUTS("
\nNotes:\n"
+"* 16344-byte (64-bit) or 16344-byte (32-bit) allocations in\n"
+"  Ruby <= 3.0 aligned to 0x4000 are likely for object heap slots.\n"
+"* 4080-byte allocations in Perl 5 are likely for arenas\n"
+"  (set via the PERL_ARENA_SIZE compile-time macro)"
+"
", fp); return h1_200(h1, &html, TYPE_HTML); } -- cgit v1.2.3-24-ge0c7