Revision
581
Author
lsansonetti@apple.com
Date
2008-09-08 14:02:00 -0700 (Mon, 08 Sep 2008)

Log Message

more GC hints, to make sure rdoc's rsize is constant

Modified Paths

Diff

Modified: MacRuby/trunk/string.c (580 => 581)


--- MacRuby/trunk/string.c	2008-09-08 21:01:28 UTC (rev 580)
+++ MacRuby/trunk/string.c	2008-09-08 21:02:00 UTC (rev 581)
@@ -413,6 +413,8 @@
 
     CFMakeCollectable((CFTypeRef)dup);
 
+    rb_gc_malloc_increase(32 + (sizeof(UniChar) * RSTRING_LEN(dup)));
+
     return dup;
 }
 
@@ -822,6 +824,7 @@
     data = (CFMutableDataRef)rb_str_cfdata2(str);
     if (data != NULL) {
 	CFDataAppendBytes(data, (const UInt8 *)ptr, len);
+	rb_gc_malloc_increase(sizeof(UniChar) * len);
     }
     else {
 	long slen;