util/HugeAllocator: remove deprepcated dynamic exception specifications

This commit is contained in:
Max Kellermann 2017-01-04 10:32:21 +01:00
parent 609c1d4d4c
commit a34dfd55be
2 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2016 Max Kellermann <max@duempel.org>
* Copyright (C) 2013-2017 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,

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2016 Max Kellermann <max@duempel.org>
* Copyright (C) 2013-2017 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