Skip to content

Commit

Permalink
memory_usage: add support for MONO_TYPE_STRING.
Browse files Browse the repository at this point in the history
svn path=/trunk/mono/; revision=89560
  • Loading branch information
robert-j committed Nov 13, 2007
1 parent 3f1c4de commit f278591
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions samples/size/size.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f278591

Please sign in to comment.