I have been using heap(1) to examine my apps heap. Small section for the 
auto_zone is shown. Queries follow.

Zone auto_zone_0x2f6000: 70460 nodes (53237600 bytes) 

    COUNT     BYTES       AVG   CLASS_NAME                                      
 TYPE    BINARY
    =====     =====       ===   ==========                                      
 ====    ======
    21999  41322304    1878.4   non-object                                      
                           
    13643   9837536     721.1   NSCFString                                      
 ObjC    CoreFoundation    
     4928    236544      48.0   NSCFDictionary                                  
 ObjC    Foundation        
     4846     77536      16.0   NSCFNumber                                      
 ObjC    Foundation        
     4455    161344      36.2   NSCFArray                                       
 ObjC    Foundation        
     1684    242496     144.0   CTRun                                           
 CFType  CoreText          
      828    169072     204.2   NSCFData                                        
 ObjC    Foundation        
      681     43584      64.0   NSBitmapImageRep                                
 ObjC    AppKit            
      595     57120      96.0   NSConcretePointerArray                          
 ObjC    Foundation        
      593    132832     224.0   _NSViewAuxiliary                                
 ObjC    AppKit            
      584     37376      64.0   NSKeyValueObservance                            
 ObjC    Foundation        
      548     17536      32.0   NSCFSet                                         
 ObjC    Foundation        
      421     20208      48.0   _NSImageAuxiliary                               
 ObjC    AppKit            
      421     13472      32.0   NSImage                                         
 ObjC    AppKit            
      406     19488      48.0   NSCellAuxiliary                                 
 ObjC    AppKit            
      351     11232      32.0   NSCalibratedRGBColor                            
 ObjC    AppKit      

My app loads up some text and displays it in a couple of NSTextViews.
The text occupies about 6MB.
Loading the text increase real memory usage by about 50MB.

1. GC is on. Does that mean that all allocations invocation by NS*/CF* will be 
in the auto_zone?
2. Are the allocations accomplished using NSZoneMalloc and CFAllocatorAllocate?
3. grepping the heap(1) output shows little data allocated to NSText* 
instances. Is some of the 40MB of non-object data allocated by the NSText 
system? for glyph storage?
4. If 3 is not utterly incorrect - why isn't the memory utilised by  the NSText 
system flagged as being allocated by NSText*.

I thought that looking at the source for CFAllocatorAllocate() might be 
illuminating but it's not part of the open source CFLite release.

Regards

Jonathan Mitchell

Developer
http://www.mugginsoft.com






_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to