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.
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.
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.