Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jordan <robertj@gmx.net>2007-11-13 18:05:33 +0300
committerRobert Jordan <robertj@gmx.net>2007-11-13 18:05:33 +0300
commitf27859185bf17c26bca4673a4a643d90034cd072 (patch)
treef8d22f6145c3d02856c84724778745f40939ae5c /samples
parent3f1c4de86171354cdb85bcc066b03ea1ef7b3625 (diff)
memory_usage: add support for MONO_TYPE_STRING.
svn path=/trunk/mono/; revision=89560
Diffstat (limited to 'samples')
-rw-r--r--samples/size/size.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/samples/size/size.c b/samples/size/size.c
index 12f39bdcb8c..c24b417d21f 100644
--- a/samples/size/size.c
+++ b/samples/size/size.c
@@ -74,6 +74,12 @@ memory_usage (MonoObject *obj, GHashTable *visited)
break;
+ case MONO_TYPE_STRING:
+ mono_field_get_value (obj, field, &value);
+ if (value != NULL)
+ total += mono_object_get_size ((MonoObject *) value);
+ break;
+
case MONO_TYPE_SZARRAY:
mono_field_get_value (obj, field, &value);