Commit a34dfd55 authored by Max Kellermann's avatar Max Kellermann

util/HugeAllocator: remove deprepcated dynamic exception specifications

parent 609c1d4d
/*
* 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,
......
/*
* 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment