summaryrefslogtreecommitdiff
path: root/rts/CheckUnload.c
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2021-10-25 09:38:22 -0700
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-12-10 06:16:41 -0500
commitf573cb16debc5424e502b3777430c02ae6d0b475 (patch)
treedeb8abbab6a0ff0ab1df96a76a014d3d3017ccd1 /rts/CheckUnload.c
parent80a25502c1f9ac4597c9408931df1bf03cad5b9e (diff)
downloadhaskell-f573cb16debc5424e502b3777430c02ae6d0b475.tar.gz
rts: use allocation helpers from RtsUtils
Just a tiny cleanup inspired by the following comment: https://gitlab.haskell.org/ghc/ghc/-/issues/19437#note_334271 I was just getting familiar with rts code base so I thought might as well do this.
Diffstat (limited to 'rts/CheckUnload.c')
-rw-r--r--rts/CheckUnload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
index f210d629b1..3761fd2bf5 100644
--- a/rts/CheckUnload.c
+++ b/rts/CheckUnload.c
@@ -182,8 +182,8 @@ static OCSectionIndices *createOCSectionIndices(void)
static void freeOCSectionIndices(OCSectionIndices *s_indices)
{
- free(s_indices->indices);
- free(s_indices);
+ stgFree(s_indices->indices);
+ stgFree(s_indices);
}
void initUnloadCheck()
@@ -231,7 +231,7 @@ static void reserveOCSectionIndices(OCSectionIndices *s_indices, int len)
s_indices->capacity = new_capacity;
s_indices->indices = new_indices;
- free(old_indices);
+ stgFree(old_indices);
}
// Insert object section indices of a single ObjectCode. Invalidates 'sorted'