summaryrefslogtreecommitdiff
path: root/rts/win32/OSMem.c
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2016-05-02 06:37:14 +1000
committerErik de Castro Lopo <erikd@mega-nerd.com>2016-05-05 08:29:27 +1000
commitdb9de7eb3e91820024f673bfdb6fb8064cfed20d (patch)
tree5e1c3ef0b6dee7f40fedbc118ba36cfe6ffdd1ee /rts/win32/OSMem.c
parentad4392c142696d5092533480a82ed65322e9d413 (diff)
downloadhaskell-db9de7eb3e91820024f673bfdb6fb8064cfed20d.tar.gz
rts: Replace `nat` with `uint32_t`
The `nat` type was an alias for `unsigned int` with a comment saying it was at least 32 bits. We keep the typedef in case client code is using it but mark it as deprecated. Test Plan: Validated on Linux, OS X and Windows Reviewers: simonmar, austin, thomie, hvr, bgamari, hsyl20 Differential Revision: https://phabricator.haskell.org/D2166
Diffstat (limited to 'rts/win32/OSMem.c')
-rw-r--r--rts/win32/OSMem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
index 0009a4ec9d..65791b69d1 100644
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -48,7 +48,7 @@ osMemInit(void)
static
alloc_rec*
-allocNew(nat n) {
+allocNew(uint32_t n) {
alloc_rec* rec;
rec = (alloc_rec*)stgMallocBytes(sizeof(alloc_rec),"getMBlocks: allocNew");
rec->size = ((W_)n+1)*MBLOCK_SIZE;
@@ -117,7 +117,7 @@ insertFree(char* alloc_base, W_ alloc_size) {
static
void*
-findFreeBlocks(nat n) {
+findFreeBlocks(uint32_t n) {
void* ret=0;
block_rec* it;
block_rec temp;
@@ -186,7 +186,7 @@ commitBlocks(char* base, W_ size) {
}
void *
-osGetMBlocks(nat n) {
+osGetMBlocks(uint32_t n) {
void* ret;
ret = findFreeBlocks(n);
if(ret==0) {
@@ -246,7 +246,7 @@ static void decommitBlocks(char *addr, W_ nBytes)
}
}
-void osFreeMBlocks(char *addr, nat n)
+void osFreeMBlocks(char *addr, uint32_t n)
{
W_ nBytes = (W_)n * MBLOCK_SIZE;