Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 1995 05:38:18 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        elh@p5.spnet.com, hackers@FreeBSD.org
Subject:   Re: is this reasonable (malloc/sbrk/malloc)?
Message-ID:  <199503241938.FAA31351@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>	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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503241938.FAA31351>