]> git.baikalelectronics.ru Git - uboot.git/commit
sandbox: Align RAM buffer to the machine page size
authorSimon Glass <sjg@chromium.org>
Sat, 15 Sep 2018 06:50:54 +0000 (00:50 -0600)
committerAlexander Graf <agraf@suse.de>
Sun, 23 Sep 2018 19:55:30 +0000 (21:55 +0200)
commitc5c10cac7cb5199771e5fd0fe4c555fda0e0e3f5
tree4f9d19d853a09a6009bd936fd6ae7c24ab5009d0
parent64ab8c9fbb98176bb3c319fe62226d60637e5068
sandbox: Align RAM buffer to the machine page size

At present the sandbox RAM buffer is not aligned to any particular
address boundary. This makes the internal pointers somewhat random with
respect to the associated RAM buffer addresses.

Align the buffer to the page size of the machine to help with this. Note
that there is a header at the start of the allocated pointer. To avoid
returning a pointer which is not aligned to a page boundary, we waste
almost an entire page of memory for each allocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/sandbox/cpu/os.c