make sure new allocations are aligned.

This commit is contained in:
cgd 1996-09-26 23:15:00 +00:00
parent f4888b894a
commit f496a53cbf

View File

@ -1,4 +1,4 @@
/* $NetBSD: alloc.c,v 1.3 1994/10/26 05:44:34 cgd Exp $ */
/* $NetBSD: alloc.c,v 1.4 1996/09/26 23:15:00 cgd Exp $ */
/*-
* Copyright (c) 1993
@ -89,8 +89,8 @@ alloc(size)
f = f->next;
}
if (f == (struct fl *)0) {
f = (struct fl *)top;
top += ALIGN(size);
f = (struct fl *)ALIGN(top);
top = (char *)f + ALIGN(size);
} else
*prev = f->next;
return ((void *)f);