VM: allow for 16KB chunk alignment
This commit is contained in:
parent
c78b56a9e5
commit
fc9b3f9bdd
2 changed files with 4 additions and 0 deletions
|
@ -171,6 +171,9 @@ phys_clicks alloc_mem(phys_clicks clicks, u32_t memflags)
|
|||
if(memflags & PAF_ALIGN64K) {
|
||||
align_clicks = (64 * 1024) / CLICK_SIZE;
|
||||
clicks += align_clicks;
|
||||
} else if(memflags & PAF_ALIGN16K) {
|
||||
align_clicks = (16 * 1024) / CLICK_SIZE;
|
||||
clicks += align_clicks;
|
||||
}
|
||||
|
||||
mem = alloc_pages(clicks, memflags, NULL);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define PAF_LOWER16MB 0x08
|
||||
#define PAF_LOWER1MB 0x10
|
||||
#define PAF_FIRSTBLOCK 0x20 /* alloc_mem: return first block */
|
||||
#define PAF_ALIGN16K 0x40 /* Aligned to 16k boundary. */
|
||||
|
||||
#define MARK do { if(mark) { printf("%d\n", __LINE__); } } while(0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue