Commit Graph

5 Commits

Author SHA1 Message Date
Ian Lepore
b1526b43e8 Set the malloc alignment to 64 bytes on platforms that use the U-Boot API
device drivers.  Recent versions of u-boot run with the MMU enabled, and
require DMA-based I/O to be aligned to cache line boundaries.

These changes are based on a patch originally submitted by Juergen Weiss,
but I reworked them and thus any problems are purely my fault.

Submitted by:	"Juergen Weiss" <weiss@uni-mainz.de>
Reviewed by:	imp, nwhitehorn, jhb
2014-02-05 22:53:58 +00:00
Tai-hwa Liang
f497fbf5e4 - Removing some unneeded definitions of NULL(cruft related to 1970's C).
In C90, NULL is guaranteed to be declared in <stddef.h> and also in
  <string.h>.  Though the correct way to define NULL in FreeBSD is to
  include <sys/_null.h>, other parts of libstand still require <string.h>
  to build; therefore, we keep <string.h> in stand.h and add a note about
  this;
- Removing no longer used 'Prototype' definition.  Quote from bde@:

	'Cruft related to getting incomplete struct declarations within
	prototypes forward-declared before the structs.  It doesn't mean
	"prototype" but only part of a prototype-related hack.  No longer
	used.'

- Replacing iaddr_t with uintptr_t;
- Removing use of long double to determine alignment.  Use a fixed 16 byte
  alignment instead;

Reviewed by:	bde
Obtained from:	DragonFlyBSD (partially)
MFC after:	1 month
2011-07-10 07:25:34 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Mike Smith
31a014da28 Prune unused zalloc components as recommended by Matt Dillon. Extra debugging
code is still enabled (it's not very expensive).
1998-10-01 17:35:08 +00:00
Mike Smith
95b50c2be3 Replace the old and extremely icky Mach/NetBSD allocator with a similarly
compact and much better one donated by Matt Dillon.  Implement a simple
sbrk() which uses the existing setheap() api.

Remove the custom allocator from the UFS code.  It wasn't working quite
right, and it shouldn't be needed with the new allocator.

Fix a serious problem with changing the value of already-existent
environment variables.  Don't attempt to modify the supposedly-const
argument to putenv()

Fix an off-by-one sizing error in the zipfs code detected by the new
allocator.

Submitted by:	zmalloc from Matt Dillon <dillon@backplane.com>
1998-09-26 01:42:40 +00:00