Skip to content

Commit a02c8fd

Browse files
committed
Adding missing bdwgc header include.
Protected code with #if HAVE_BDWGC_GC Comment debug code.
1 parent 295ffc6 commit a02c8fd

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

mono/metadata/unity-memory-info.c

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
#include <glib.h>
1414
#include <stdlib.h>
1515

16+
#if HAVE_BDWGC_GC
17+
18+
#include "external/bdwgc/include/gc.h"
19+
1620
typedef struct CollectMetadataContext
1721
{
1822
GHashTable *allTypes;
@@ -648,7 +652,7 @@ MonoManagedMemorySnapshot* mono_unity_capture_memory_snapshot()
648652
FillRuntimeInformation(&snapshot->runtimeInformation);
649653

650654
#if _DEBUG
651-
VerifySnapshot(snapshot, monoImages);
655+
// VerifySnapshot(snapshot, monoImages);
652656
#endif
653657

654658
g_hash_table_destroy(monoImages);
@@ -678,4 +682,21 @@ void mono_unity_free_captured_memory_snapshot(MonoManagedMemorySnapshot* snapsho
678682

679683
g_free(metadata->types);
680684
g_free(snapshot);
681-
}
685+
}
686+
687+
#else
688+
689+
MonoManagedMemorySnapshot* mono_unity_capture_memory_snapshot()
690+
{
691+
MonoManagedMemorySnapshot* snapshot;
692+
snapshot = g_new0(MonoManagedMemorySnapshot, 1);
693+
694+
return snapshot;
695+
}
696+
697+
void mono_unity_free_captured_memory_snapshot(MonoManagedMemorySnapshot* snapshot)
698+
{
699+
g_free(snapshot);
700+
}
701+
702+
#endif

0 commit comments

Comments
 (0)