mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 23:05:49 +01:00
Allocate aligned memory according to sizeof(char *).
Approved by: jkh Obtained from: NetBSD
This commit is contained in:
parent
a911876b48
commit
0b919713bb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42625
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user