views:

93

answers:

1

My application usually only takes up ~40M of memory but when CoreText is used VSIZE jumps up to ~300M. How can I get CoreText to use less memory?

P.S. : I use lots of CoreText objects.

P.S. 2 : I use 'top' to get memory info.

+1  A: 

First, VSIZE is not really a good indicator of how much "memory" your app is using. It is more an indicator of how much of your virtual address space is in use, which includes things like memory (RAM), mmap-ed files, etc. For 64-bit apps in particular, VSIZE will always be large (> 1 GB).

If you want to know how much physical memory you're using, check RSIZE instead.

Have you noticed anything abnormal about your program? Does the memory usage grow over time when using CoreText? If so then you may have a leak, in which case the best approach would be to profile your app using Instruments to see if your code is leaking.

Jason Foreman
For garbage-collected apps, VSIZE will be *very* large—so large that we had to add a section to our user documentation about it: http://growl.info/documentation/faq.php#growlmenu-vsize
Peter Hosey
@Peter Hosey Very interesting, Peter. Thanks for the link.
Preston
No, the memory usage becomes high as soon as core text is used.
Nick Brooks