From owner-freebsd-current@FreeBSD.ORG Mon Dec 12 10:17:44 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9433316A41F; Mon, 12 Dec 2005 10:17:44 +0000 (GMT) (envelope-from dfr@nlsystems.com) Received: from itchy.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DBC343D49; Mon, 12 Dec 2005 10:17:43 +0000 (GMT) (envelope-from dfr@nlsystems.com) Received: from herring.rabson.org (herring.rabson.org [80.177.232.250]) by itchy.rabson.org (8.13.3/8.13.3) with ESMTP id jBCAHB9T053897; Mon, 12 Dec 2005 10:17:11 GMT (envelope-from dfr@nlsystems.com) From: Doug Rabson To: freebsd-current@freebsd.org Date: Mon, 12 Dec 2005 10:17:09 +0000 User-Agent: KMail/1.8.2 References: <20051212014852.GA8775@shaka.acc.umu.se> <9FAD2B4B-C167-42D7-A8E7-BE03F4C07543@canonware.com> <439CEB74.9080505@acc.umu.se> In-Reply-To: <439CEB74.9080505@acc.umu.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512121017.10220.dfr@nlsystems.com> X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on itchy.rabson.org X-Virus-Scanned: ClamAV 0.87.1/1208/Mon Dec 12 08:51:58 2005 on itchy.rabson.org X-Virus-Status: Clean Cc: Johan Bucht , Jason Evans , current@freebsd.org Subject: Re: New libc malloc patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2005 10:17:44 -0000 On Monday 12 December 2005 03:16, Johan Bucht wrote: > Isn't 8 byte alignment expected by some applications? > How do you know if a allocation is huge if you don't have a tag? > Something more to read up on i guess. =) Actually, I'm glad you pointed that out. My own applications use SSE2 primitives a lot and those guys need to be allocated on 16-byte boundaries. I currently use phkmalloc which has the nice property that small allocations are aligned to the next greater power-of-2 boundary which is (for me) always at least 16. Since you are targetting modern architectures with this allocator, could you please set the minimum alignment on all i386 and amd64 processors to 16. For what its worth, when gcc is using SSE instructions, it assumes this for all memory, stack or malloc.