Allocate aligned memory according to sizeof(char *).

Approved by: jkh
Obtained from: NetBSD
This commit is contained in:
Hidetoshi Shimokawa 1999-01-13 10:37:22 +00:00
parent a911876b48
commit 0b919713bb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42625

View File

@ -64,8 +64,8 @@ salloc(size)
int index;
s = size;
s += 3;
s &= ~03;
s += (sizeof (char *) - 1);
s &= ~(sizeof (char *) - 1);
index = 0;
for (sp = &stringdope[0]; sp < &stringdope[NSPACE]; sp++) {
if (sp->s_topFree == NOSTR && (STRINGSIZE << index) >= s)