Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a34dfd55
Commit
a34dfd55
authored
Jan 04, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/HugeAllocator: remove deprepcated dynamic exception specifications
parent
609c1d4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
HugeAllocator.cxx
src/util/HugeAllocator.cxx
+5
-3
HugeAllocator.hxx
src/util/HugeAllocator.hxx
+5
-6
No files found.
src/util/HugeAllocator.cxx
View file @
a34dfd55
/*
* Copyright (C) 2013-201
6
Max Kellermann <max@duempel.org>
* Copyright (C) 2013-201
7
Max Kellermann <max@duempel.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -29,6 +29,8 @@
#include "HugeAllocator.hxx"
#include <new>
#ifdef __linux__
#include <sys/mman.h>
#include <unistd.h>
...
...
@@ -54,7 +56,7 @@ AlignToPageSize(size_t size)
}
void
*
HugeAllocate
(
size_t
size
)
throw
(
std
::
bad_alloc
)
HugeAllocate
(
size_t
size
)
{
size
=
AlignToPageSize
(
size
);
...
...
@@ -97,7 +99,7 @@ HugeDiscard(void *p, size_t size) noexcept
#elif defined(WIN32)
void
*
HugeAllocate
(
size_t
size
)
throw
(
std
::
bad_alloc
)
HugeAllocate
(
size_t
size
)
{
// TODO: use MEM_LARGE_PAGES
void
*
p
=
VirtualAlloc
(
nullptr
,
size
,
...
...
src/util/HugeAllocator.hxx
View file @
a34dfd55
/*
* Copyright (C) 2013-201
6
Max Kellermann <max@duempel.org>
* Copyright (C) 2013-201
7
Max Kellermann <max@duempel.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -32,7 +32,6 @@
#include "Compiler.h"
#include <new>
#include <utility>
#include <stddef.h>
...
...
@@ -46,7 +45,7 @@
*/
gcc_malloc
void
*
HugeAllocate
(
size_t
size
)
throw
(
std
::
bad_alloc
)
;
HugeAllocate
(
size_t
size
);
/**
* @param p an allocation returned by HugeAllocate()
...
...
@@ -71,7 +70,7 @@ HugeDiscard(void *p, size_t size) noexcept;
gcc_malloc
void
*
HugeAllocate
(
size_t
size
)
throw
(
std
::
bad_alloc
)
;
HugeAllocate
(
size_t
size
);
static
inline
void
HugeFree
(
void
*
p
,
gcc_unused
size_t
size
)
noexcept
...
...
@@ -93,7 +92,7 @@ HugeDiscard(void *p, size_t size) noexcept
gcc_malloc
static
inline
void
*
HugeAllocate
(
size_t
size
)
throw
(
std
::
bad_alloc
)
HugeAllocate
(
size_t
size
)
{
return
new
uint8_t
[
size
];
}
...
...
@@ -122,7 +121,7 @@ class HugeAllocation {
public
:
HugeAllocation
()
=
default
;
HugeAllocation
(
size_t
_size
)
throw
(
std
::
bad_alloc
)
HugeAllocation
(
size_t
_size
)
:
data
(
HugeAllocate
(
_size
)),
size
(
_size
)
{}
HugeAllocation
(
HugeAllocation
&&
src
)
noexcept
...
...
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