Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
10bca216
Commit
10bca216
authored
Dec 20, 2004
by
kaa@polly.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compilation for old Linux distributions that have no HugeTLB support
parent
3777af45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
innobase/os/os0proc.c
innobase/os/os0proc.c
+10
-4
No files found.
innobase/os/os0proc.c
View file @
10bca216
...
@@ -532,7 +532,7 @@ os_mem_alloc_large(
...
@@ -532,7 +532,7 @@ os_mem_alloc_large(
ibool
assert_on_error
)
/* in: if TRUE, we crash mysqld if the memory
ibool
assert_on_error
)
/* in: if TRUE, we crash mysqld if the memory
cannot be allocated */
cannot be allocated */
{
{
#ifdef
UNIV_LINUX
#ifdef
HAVE_LARGE_PAGES
ulint
size
;
ulint
size
;
int
shmid
;
int
shmid
;
void
*
ptr
=
NULL
;
void
*
ptr
=
NULL
;
...
@@ -541,7 +541,8 @@ os_mem_alloc_large(
...
@@ -541,7 +541,8 @@ os_mem_alloc_large(
if
(
!
os_use_large_pages
||
!
os_large_page_size
)
{
if
(
!
os_use_large_pages
||
!
os_large_page_size
)
{
goto
skip
;
goto
skip
;
}
}
#ifdef UNIV_LINUX
/* Align block size to os_large_page_size */
/* Align block size to os_large_page_size */
size
=
((
n
-
1
)
&
~
(
os_large_page_size
-
1
))
+
os_large_page_size
;
size
=
((
n
-
1
)
&
~
(
os_large_page_size
-
1
))
+
os_large_page_size
;
...
@@ -561,6 +562,7 @@ os_mem_alloc_large(
...
@@ -561,6 +562,7 @@ os_mem_alloc_large(
*/
*/
shmctl
(
shmid
,
IPC_RMID
,
&
buf
);
shmctl
(
shmid
,
IPC_RMID
,
&
buf
);
}
}
#endif
if
(
ptr
)
{
if
(
ptr
)
{
if
(
set_to_zero
)
{
if
(
set_to_zero
)
{
...
@@ -573,8 +575,8 @@ os_mem_alloc_large(
...
@@ -573,8 +575,8 @@ os_mem_alloc_large(
}
}
fprintf
(
stderr
,
"InnoDB HugeTLB: Warning: Using conventional memory pool
\n
"
);
fprintf
(
stderr
,
"InnoDB HugeTLB: Warning: Using conventional memory pool
\n
"
);
#endif
skip:
skip:
#endif
/* HAVE_LARGE_PAGES */
return
(
ut_malloc_low
(
n
,
set_to_zero
,
assert_on_error
));
return
(
ut_malloc_low
(
n
,
set_to_zero
,
assert_on_error
));
}
}
...
@@ -587,8 +589,12 @@ os_mem_free_large(
...
@@ -587,8 +589,12 @@ os_mem_free_large(
/*=================*/
/*=================*/
void
*
ptr
)
/* in: number of bytes */
void
*
ptr
)
/* in: number of bytes */
{
{
#ifdef HAVE_LARGE_PAGES
if
(
os_use_large_pages
&&
os_large_page_size
#ifdef UNIV_LINUX
#ifdef UNIV_LINUX
if
(
os_use_large_pages
&&
os_large_page_size
&&
!
shmdt
(
ptr
))
{
&&
!
shmdt
(
ptr
)
#endif
)
{
return
;
return
;
}
}
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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