Skip to content

Instantly share code, notes, and snippets.

@bilke
Created May 17, 2016 09:52
Show Gist options
  • Select an option

  • Save bilke/8a6e31d8a3f452f99f6cb1f441a73f7f to your computer and use it in GitHub Desktop.

Select an option

Save bilke/8a6e31d8a3f452f99f6cb1f441a73f7f to your computer and use it in GitHub Desktop.
λ git diff
warning: LF will be replaced by CRLF in dune/common/debugallocator.cc.
The file will have its original line endings in your working directory.
diff --git a/dune/common/debugallocator.cc b/dune/common/debugallocator.cc
index a833050..3f8ac77 100644
--- a/dune/common/debugallocator.cc
+++ b/dune/common/debugallocator.cc
@@ -7,7 +7,7 @@
#include "debugallocator.hh"
#include <iostream>
-#include <unistd.h>
+//#include <unistd.h>
#include <cstdlib>
namespace Dune
@@ -15,7 +15,7 @@ namespace Dune
namespace DebugMemory
{
// system constant for page size
- const std::ptrdiff_t page_size = sysconf(_SC_PAGESIZE);
+ //const std::ptrdiff_t page_size = sysconf(_SC_PAGESIZE);
// implement member functions
void AllocationManager::allocation_error(const char* msg)
diff --git a/dune/common/debugallocator.hh b/dune/common/debugallocator.hh
index a061f5b..ac6f5bf 100644
--- a/dune/common/debugallocator.hh
+++ b/dune/common/debugallocator.hh
@@ -106,7 +106,7 @@ namespace Dune
it->capacity << " bytes at " << it->ptr << std::endl;
error = true;
}
- munmap(it->page_ptr, it->pages * page_size);
+ //munmap(it->page_ptr, it->pages * page_size);
}
if (error)
allocation_error("lost allocations");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment