Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
b7e5d722
Commit
b7e5d722
authored
Mar 12, 2014
by
awson
Committed by
Austin Seipp
Mar 13, 2014
Browse files
Fix incorrect blocksize calculation on Win64
Fixes #8839 Signed-off-by:
Austin Seipp
<
austin@well-typed.com
>
parent
623883f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/rts/storage/Block.h
View file @
b7e5d722
...
...
@@ -9,16 +9,26 @@
#ifndef RTS_STORAGE_BLOCK_H
#define RTS_STORAGE_BLOCK_H
#include
"ghcconfig.h"
/* The actual block and megablock-size constants are defined in
* includes/Constants.h, all constants here are derived from these.
*/
/* Block related constants (BLOCK_SHIFT is defined in Constants.h) */
#if SIZEOF_LONG == SIZEOF_VOID_P
#define UNIT 1UL
#elif SIZEOF_LONG_LONG == SIZEOF_VOID_P
#define UNIT 1ULL
#else
#error "Size of pointer is suspicious."
#endif
#ifdef CMINUSMINUS
#define BLOCK_SIZE (1<<BLOCK_SHIFT)
#else
#define BLOCK_SIZE (
1UL
<<BLOCK_SHIFT)
#define BLOCK_SIZE (
UNIT
<<BLOCK_SHIFT)
// Note [integer overflow]
#endif
...
...
@@ -33,7 +43,7 @@
#ifdef CMINUSMINUS
#define MBLOCK_SIZE (1<<MBLOCK_SHIFT)
#else
#define MBLOCK_SIZE (
1UL
<<MBLOCK_SHIFT)
#define MBLOCK_SIZE (
UNIT
<<MBLOCK_SHIFT)
// Note [integer overflow]
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment