From e3557741edadf7e551d6423de255279ae02c7caf Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Tue, 7 May 2013 12:23:58 +0200 Subject: [PATCH] [debugallocator] fix global extern variable --- dune/common/debugallocator.cc | 2 +- dune/common/debugallocator.hh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dune/common/debugallocator.cc b/dune/common/debugallocator.cc index c072904b7..3f733908a 100644 --- a/dune/common/debugallocator.cc +++ b/dune/common/debugallocator.cc @@ -15,7 +15,7 @@ namespace Dune namespace DebugMemory { // system constant for page size - const AllocationManager::difference_type AllocationManager::page_size = getpagesize(); + const std::ptrdiff_t page_size = getpagesize(); // implement member functions void AllocationManager::allocation_error(const char* msg) diff --git a/dune/common/debugallocator.hh b/dune/common/debugallocator.hh index 5786e0048..3a9254647 100644 --- a/dune/common/debugallocator.hh +++ b/dune/common/debugallocator.hh @@ -25,6 +25,8 @@ namespace Dune namespace DebugMemory { + extern const std::ptrdiff_t page_size; + struct AllocationManager { typedef std::size_t size_type; @@ -32,7 +34,6 @@ namespace Dune typedef void* pointer; protected: - static const difference_type page_size; static void allocation_error(const char* msg); struct AllocationInfo; -- GitLab