diff options
Diffstat (limited to 'libgo/runtime/malloc.h')
-rw-r--r-- | libgo/runtime/malloc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/runtime/malloc.h b/libgo/runtime/malloc.h index 16bb449..96cb609 100644 --- a/libgo/runtime/malloc.h +++ b/libgo/runtime/malloc.h @@ -128,6 +128,15 @@ enum MaxGcproc = 4, }; +// Maximum memory allocation size, a hint for callers. +// This must be a #define instead of an enum because it +// is so large. +#if __SIZEOF_POINTER__ == 8 +#define MaxMem (16ULL<<30) /* 16 GB */ +#else +#define MaxMem ((uintptr)-1) +#endif + // A generic linked list of blocks. (Typically the block is bigger than sizeof(MLink).) struct MLink { |