From owner-freebsd-hackers Fri Mar 24 11:43:55 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id LAA17777 for hackers-outgoing; Fri, 24 Mar 1995 11:43:55 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id LAA17771 for ; Fri, 24 Mar 1995 11:43:51 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id FAA31351; Sat, 25 Mar 1995 05:38:18 +1000 Date: Sat, 25 Mar 1995 05:38:18 +1000 From: Bruce Evans Message-Id: <199503241938.FAA31351@godzilla.zeta.org.au> To: elh@p5.spnet.com, hackers@FreeBSD.org Subject: Re: is this reasonable (malloc/sbrk/malloc)? Sender: hackers-owner@FreeBSD.org Precedence: bulk > in fbsd, however, subsequent library calls (getcwd() > via opendir), check to make sure the space returned by > malloc is aligned, and return NULL (with a misleading > errno set) if it isn't. I couldn't see where opendir checks it. > 1) should fbsd's sbrk returned aligned values, > ie, emulate SunOS 4.1.x behavior > 2) where's the sbrk/malloc warning in fbsd? I think malloc() is broken. It is documented to return page-aligned storage "if the space is of pagesize or larger". Aligning the brk to a multiple of 8 in sbrk() won't fix malloc(). 1 is a less unsuitable alignment on x86's than on systems that force alignment checking. Bruce