From: Andreas Schneider Date: Thu, 27 Apr 2023 09:24:59 +0000 (+0200) Subject: lib:talloc: Increase alloc size to 128 kilobytes X-Git-Tag: tdb-1.4.13~1043 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39c13f062a859d17b5be3a2a02fece8d0b1819f1;p=thirdparty%2Fsamba.git lib:talloc: Increase alloc size to 128 kilobytes We want to avoid that the optimizer will use stack allocations. This way the test should be a bit more realistic. Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke --- diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c index a4a3f4e89d1..a305e5c09da 100644 --- a/lib/talloc/testsuite.c +++ b/lib/talloc/testsuite.c @@ -859,6 +859,10 @@ static bool test_unref_reparent(void) return true; } +/* Make the size big enough to not fit into the stack */ +#define ALLOC_SIZE (128 * 1024) +#define ALLOC_DUP_STRING "talloc talloc talloc talloc talloc talloc talloc" + /* measure the speed of talloc versus malloc */ @@ -878,9 +882,9 @@ static bool test_speed(void) do { void *p1, *p2, *p3; for (i=0;i