From owner-svn-src-stable@freebsd.org Thu Dec 19 02:05:49 2019 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20F8C1D03C5; Thu, 19 Dec 2019 02:05:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47dZwY0995z44dH; Thu, 19 Dec 2019 02:05:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 010037846; Thu, 19 Dec 2019 02:05:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBJ25mAR060860; Thu, 19 Dec 2019 02:05:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ25mZ8060859; Thu, 19 Dec 2019 02:05:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190205.xBJ25mZ8060859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355897 - in stable: 11/stand/liblua 12/stand/liblua X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/liblua 12/stand/liblua X-SVN-Commit-Revision: 355897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:05:49 -0000 Author: kevans Date: Thu Dec 19 02:05:48 2019 New Revision: 355897 URL: https://svnweb.freebsd.org/changeset/base/355897 Log: stand: liblua: drop default buffer size to 128 Lua allocates LUAL_BUFFERSIZE buffers on the stack for various string functions (string.format, string.gsub) -- this works out to be somewhat significant and not necessary, based on how we use string operations. Dropping it risks having to allocate per call to format/gsub, but this is not the case for our usage. This simply stops allocating 8K buffers on the stack when luaL_Buffer is used. Modified: stable/11/stand/liblua/luaconf.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/liblua/luaconf.h Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/liblua/luaconf.h ============================================================================== --- stable/11/stand/liblua/luaconf.h Thu Dec 19 02:04:40 2019 (r355896) +++ stable/11/stand/liblua/luaconf.h Thu Dec 19 02:05:48 2019 (r355897) @@ -783,11 +783,7 @@ ** smaller buffer would force a memory allocation for each call to ** 'string.format'.) */ -#if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE -#define LUAL_BUFFERSIZE 8192 -#else -#define LUAL_BUFFERSIZE ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer))) -#endif +#define LUAL_BUFFERSIZE 128 /* }================================================================== */