[commit: ghc] master: Get types in osFreeMBlocks in sync with osGetMBlocks (8abc193)
git at git.haskell.org
git at git.haskell.org
Thu May 19 19:31:35 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8abc193dd3117adae126d43da3ae04cb045808da/ghc
>---------------------------------------------------------------
commit 8abc193dd3117adae126d43da3ae04cb045808da
Author: Tomas Carnecky <tomas.carnecky at gmail.com>
Date: Thu May 19 21:03:42 2016 +0200
Get types in osFreeMBlocks in sync with osGetMBlocks
The first argument of 'osFreeMBlocks' ought to have the same type as the
return value from 'osGetMBlocks'. Make it so.
Reviewers: austin, simonmar, bgamari
Reviewed By: bgamari
Subscribers: erikd, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D2235
>---------------------------------------------------------------
8abc193dd3117adae126d43da3ae04cb045808da
rts/posix/OSMem.c | 2 +-
rts/sm/OSMem.h | 2 +-
rts/win32/OSMem.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index 4e6ecc2..5c997ab 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -294,7 +294,7 @@ osGetMBlocks(uint32_t n)
return ret;
}
-void osFreeMBlocks(char *addr, uint32_t n)
+void osFreeMBlocks(void *addr, uint32_t n)
{
munmap(addr, n * MBLOCK_SIZE);
}
diff --git a/rts/sm/OSMem.h b/rts/sm/OSMem.h
index defa0d4..a9d4fc9 100644
--- a/rts/sm/OSMem.h
+++ b/rts/sm/OSMem.h
@@ -13,7 +13,7 @@
void osMemInit(void);
void *osGetMBlocks(uint32_t n);
-void osFreeMBlocks(char *addr, uint32_t n);
+void osFreeMBlocks(void *addr, uint32_t n);
void osReleaseFreeMemory(void);
void osFreeAllMBlocks(void);
W_ getPageSize (void);
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
index 65791b6..c51aab7 100644
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -246,7 +246,7 @@ static void decommitBlocks(char *addr, W_ nBytes)
}
}
-void osFreeMBlocks(char *addr, uint32_t n)
+void osFreeMBlocks(void *addr, uint32_t n)
{
W_ nBytes = (W_)n * MBLOCK_SIZE;
More information about the ghc-commits
mailing list