summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-03-07 21:06:54 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-03-08 15:02:31 -0500
commit0af21dfa1b50e618df4dd4e4f7be6e0e2c9aac25 (patch)
tree87d7b4dd74405654fc22e3e2aca267a96c72004e /rts
parent662b61662f7a347c8070d9395169afb3eee6efa4 (diff)
downloadhaskell-0af21dfa1b50e618df4dd4e4f7be6e0e2c9aac25.tar.gz
rts: Rename clear_segment(_free_blocks)?
To reflect the fact that these are to do with the nonmoving collector, now since they are exposed no longer static.
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/NonMoving.h4
-rw-r--r--rts/sm/NonMovingSweep.c8
-rw-r--r--rts/sm/Storage.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/rts/sm/NonMoving.h b/rts/sm/NonMoving.h
index ebc440e8ab..02c7806345 100644
--- a/rts/sm/NonMoving.h
+++ b/rts/sm/NonMoving.h
@@ -361,9 +361,9 @@ void print_thread_list(StgTSO* tso);
#endif
-RTS_PRIVATE void clear_segment(struct NonmovingSegment*);
+RTS_PRIVATE void nonmovingClearSegment(struct NonmovingSegment*);
-RTS_PRIVATE void clear_segment_free_blocks(struct NonmovingSegment*);
+RTS_PRIVATE void nonmovingClearSegmentFreeBlocks(struct NonmovingSegment*);
#include "EndPrivate.h"
diff --git a/rts/sm/NonMovingSweep.c b/rts/sm/NonMovingSweep.c
index 29cf7a6bfe..381a66e9b5 100644
--- a/rts/sm/NonMovingSweep.c
+++ b/rts/sm/NonMovingSweep.c
@@ -110,14 +110,14 @@ void nonmovingGcCafs()
#endif
void
-clear_segment(struct NonmovingSegment* seg)
+nonmovingClearSegment(struct NonmovingSegment* seg)
{
size_t end = ((size_t)seg) + NONMOVING_SEGMENT_SIZE;
memset(&seg->bitmap, 0, end - (size_t)&seg->bitmap);
}
void
-clear_segment_free_blocks(struct NonmovingSegment* seg)
+nonmovingClearSegmentFreeBlocks(struct NonmovingSegment* seg)
{
unsigned int block_size = nonmovingSegmentBlockSize(seg);
for (unsigned int p_idx = 0; p_idx < nonmovingSegmentBlockCount(seg); ++p_idx) {
@@ -142,11 +142,11 @@ GNUC_ATTR_HOT void nonmovingSweep(void)
switch (ret) {
case SEGMENT_FREE:
- IF_DEBUG(sanity, clear_segment(seg));
+ IF_DEBUG(sanity, nonmovingClearSegment(seg));
nonmovingPushFreeSegment(seg);
break;
case SEGMENT_PARTIAL:
- IF_DEBUG(sanity, clear_segment_free_blocks(seg));
+ IF_DEBUG(sanity, nonmovingClearSegmentFreeBlocks(seg));
nonmovingPushActiveSegment(seg);
break;
case SEGMENT_FILLED:
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index 0c4d306710..8bb3fc79d8 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1942,19 +1942,19 @@ void rts_clearMemory(void) {
if (RtsFlags.GcFlags.useNonmoving)
{
for (struct NonmovingSegment *seg = nonmovingHeap.free; seg; seg = seg->link) {
- clear_segment(seg);
+ nonmovingClearSegment(seg);
}
for (int i = 0; i < NONMOVING_ALLOCA_CNT; ++i) {
struct NonmovingAllocator *alloc = &nonmovingHeap.allocators[i];
for (struct NonmovingSegment *seg = alloc->active; seg; seg = seg->link) {
- clear_segment_free_blocks(seg);
+ nonmovingClearSegmentFreeBlocks(seg);
}
for (unsigned int j = 0; j < getNumCapabilities(); ++j) {
Capability *cap = getCapability(j);
- clear_segment_free_blocks(cap->current_segments[i]);
+ nonmovingClearSegmentFreeBlocks(cap->current_segments[i]);
}
}
}