summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-09-18 11:19:02 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-09-18 11:19:02 +0400
commit4826b61c33da53ddf2c859934ef00c299cc890f3 (patch)
treef5b058ca1a24d7a0fc88b6ec7da6fc1af55c7d69 /mysys
parent7ee331ab5d35e0d428cebf56a385627f2c65f76c (diff)
downloadmariadb-git-4826b61c33da53ddf2c859934ef00c299cc890f3.tar.gz
Bug #43606: 4GB Limit on huge_pages shared memory set-up
Large pages allocator could not allocate more than 4 GB due to incorrect size alignment. mysys/my_largepage.c: Large pages allocator could not allocate more than 4 GB due to incorrect size alignment.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_largepage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c
index a20111396cb..b50a606c8d8 100644
--- a/mysys/my_largepage.c
+++ b/mysys/my_largepage.c
@@ -121,7 +121,7 @@ uchar* my_large_malloc_int(size_t size, myf my_flags)
DBUG_ENTER("my_large_malloc_int");
/* Align block size to my_large_page_size */
- size = ((size - 1) & ~(my_large_page_size - 1)) + my_large_page_size;
+ size= MY_ALIGN(size, (size_t) my_large_page_size);
shmid = shmget(IPC_PRIVATE, size, SHM_HUGETLB | SHM_R | SHM_W);
if (shmid < 0)