commit 245780e4083ab07eef6b3d76a26c5b8306a6653c
parent 118d226f534a1f201e7a14945ac632a73e9f2d2f
Author: sin <sin@2f30.org>
Date: Fri, 2 Aug 2013 11:38:08 +0100
Change minimum alignment to 16 bytes
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/random/rballoc.c b/random/rballoc.c
@@ -10,7 +10,7 @@
#include "tree.h"
#include "spinlock.h"
-enum { PAGESIZE = 4096 };
+enum { MINALIGNMENT = 16 };
struct node {
void *buf;
@@ -148,7 +148,7 @@ aligned_malloc(size_t align, size_t siz)
void *
malloc(size_t siz)
{
- return aligned_malloc(PAGESIZE, siz);
+ return aligned_malloc(MINALIGNMENT, siz);
}
void *
@@ -188,7 +188,7 @@ realloc(void *oldp, size_t siz)
unlock(&rblock);
return NULL;
}
- newan->buf = sbrk_aligned(PAGESIZE, siz);
+ newan->buf = sbrk_aligned(MINALIGNMENT, siz);
if (!newan->buf) {
free_object(newan, sizeof(*newan));
unlock(&rblock);