Module: xenomai-3 Branch: wip/heapmem Commit: bac489be0f19b236dd5f7d18480f4557c6a34e0a URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=bac489be0f19b236dd5f7d18480f4557c6a34e0a
Author: Philippe Gerum <r...@xenomai.org> Date: Sun May 13 17:17:06 2018 +0200 boilerplate/heapmem: move heap limit to ~4GB --- include/boilerplate/heapmem.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boilerplate/heapmem.h b/include/boilerplate/heapmem.h index c4348b0..0ddd1ce 100644 --- a/include/boilerplate/heapmem.h +++ b/include/boilerplate/heapmem.h @@ -35,10 +35,10 @@ */ #define HEAPMEM_MAX (HEAPMEM_PAGE_SHIFT - HEAPMEM_MIN_LOG2) #define HEAPMEM_MIN_ALIGN (1U << HEAPMEM_MIN_LOG2) -/* Max size of an extent (2Gb). */ -#define HEAPMEM_MAX_EXTSZ (1U << 31) +/* Max size of an extent (4Gb - HEAPMEM_PAGE_SIZE). */ +#define HEAPMEM_MAX_EXTSZ (4294967295U - HEAPMEM_PAGE_SIZE + 1) /* Bits we need for encoding a page # */ -#define HEAPMEM_PGENT_BITS (31 - HEAPMEM_PAGE_SHIFT - 1) +#define HEAPMEM_PGENT_BITS (32 - HEAPMEM_PAGE_SHIFT) /* Each page is represented by a page map entry. */ #define HEAPMEM_PGMAP_BYTES sizeof(struct heapmem_pgentry) _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git