From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 68E451F47D for ; Mon, 9 Jan 2023 06:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1673245296; bh=W/HIiahhcFV8C1mxk4tOyk4c6HajselBELA6Shfq/EA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lIu+pppq1rFrIyGfffd5puOczu6zVxjX5mGezCMIhUVNNzMHiPqm/de27YtcfBbv0 fpbKFjdGIFWLRCvkn/KNIdEFGEu5U0DnIeOdO3GuB1PmbasPzN0A/j1bqIoNzkBjpr zdc4fYypVf1FBRVwR96TkfpHOlZ3BePWSf1y7ePw= From: Eric Wong To: mwrap-public@80x24.org Subject: [PATCH 1/2] httpd: add notes about arenas and object heaps Date: Mon, 9 Jan 2023 06:21:35 +0000 Message-Id: <20230109062136.2543690-2-e@80x24.org> In-Reply-To: <20230109062136.2543690-1-e@80x24.org> References: <20230109062136.2543690-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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); }