aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory/qv4mmdefs_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-05-16 12:42:42 +0200
committerLars Knoll <lars.knoll@qt.io>2017-05-19 06:22:57 +0000
commit2affe19182b99d8d1c9655fa0c58c8af3e0b9506 (patch)
tree1b5b05041bcd4a736a886a5e896e4f1d297c5401 /src/qml/memory/qv4mmdefs_p.h
parent947310e01355b3657bf5d0103545586bf5a9b37c (diff)
Free up completely empty Chunks, and return the memory to the OS
Detect any Chunk that's completely empty, deallocate it and return the memory to the OS (as far as that's supported). Change-Id: I6b6a77f2cdf478cbf16aad30a9cae37c98c6500e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/memory/qv4mmdefs_p.h')
-rw-r--r--src/qml/memory/qv4mmdefs_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/memory/qv4mmdefs_p.h b/src/qml/memory/qv4mmdefs_p.h
index db0ffe11a2..6e820dfc0f 100644
--- a/src/qml/memory/qv4mmdefs_p.h
+++ b/src/qml/memory/qv4mmdefs_p.h
@@ -59,6 +59,10 @@ QT_BEGIN_NAMESPACE
namespace QV4 {
+struct MarkStack;
+
+typedef void(*ClassDestroyStatsCallback)(const char *);
+
/*
* Chunks are the basic structure containing GC managed objects.
*
@@ -175,7 +179,7 @@ struct Chunk {
return usedSlots;
}
- void sweep();
+ bool sweep();
void freeAll();
void sortIntoBins(HeapItem **bins, uint nBins);