summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/system-alloc.h8
-rw-r--r--src/windows/port.cc6
2 files changed, 9 insertions, 5 deletions
diff --git a/src/system-alloc.h b/src/system-alloc.h
index 2d49fc3..89240cd 100644
--- a/src/system-alloc.h
+++ b/src/system-alloc.h
@@ -57,8 +57,9 @@ class SysAllocator;
// aligned.
//
// Returns NULL when out of memory.
-extern void* TCMalloc_SystemAlloc(size_t bytes, size_t *actual_bytes,
- size_t alignment = 0);
+extern PERFTOOLS_DLL_DECL
+void* TCMalloc_SystemAlloc(size_t bytes, size_t *actual_bytes,
+ size_t alignment = 0);
// This call is a hint to the operating system that the pages
// contained in the specified range of memory will not be used for a
@@ -71,7 +72,8 @@ extern void* TCMalloc_SystemAlloc(size_t bytes, size_t *actual_bytes,
// be released, partial pages will not.)
//
// Returns false if release failed or not supported.
-extern bool TCMalloc_SystemRelease(void* start, size_t length);
+extern PERFTOOLS_DLL_DECL
+bool TCMalloc_SystemRelease(void* start, size_t length);
// The current system allocator.
extern PERFTOOLS_DLL_DECL SysAllocator* sys_alloc;
diff --git a/src/windows/port.cc b/src/windows/port.cc
index 641c3c9..591e3a8 100644
--- a/src/windows/port.cc
+++ b/src/windows/port.cc
@@ -225,8 +225,9 @@ size_t TCMalloc_SystemTaken = 0;
// This is mostly like MmapSysAllocator::Alloc, except it does these weird
// munmap's in the middle of the page, which is forbidden in windows.
-extern void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size,
- size_t alignment) {
+extern PERFTOOLS_DLL_DECL
+void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size,
+ size_t alignment) {
// Align on the pagesize boundary
const int pagesize = getpagesize();
if (alignment < pagesize) alignment = pagesize;
@@ -261,6 +262,7 @@ extern void* TCMalloc_SystemAlloc(size_t size, size_t *actual_size,
return reinterpret_cast<void*>(ptr);
}
+extern PERFTOOLS_DLL_DECL
bool TCMalloc_SystemRelease(void* start, size_t length) {
// TODO(csilvers): should I be calling VirtualFree here?
return false;