objc

NXZone.h
Go to the documentation of this file.
1 
8 #pragma once
9 
11 // NXZone
12 
23 @interface NXZone : NXObject {
24 @protected
25  size_t _size;
26  size_t _count;
27 @private
28  void *_root;
29  void *_cur;
30 }
31 
36 + (id)defaultZone;
37 
47 + (id)zoneWithSize:(size_t)size;
48 
53 - (void)dealloc;
54 
60 - (void *)allocWithSize:(size_t)size;
61 
66 - (void)free:(void *)ptr;
67 
74 - (void)dump;
75 
84 - (size_t)bytesTotal;
85 
92 - (size_t)bytesUsed;
93 
100 - (size_t)bytesFree;
101 
102 @end
size_t bytesFree()
Returns the free size of the memory zone.
void dealloc()
Deallocates the memory zone.
size_t _count
Current number of active allocations in the zone.
Definition: NXZone.h:26
void dump()
Walks through the zone and outputs information about allocations.
A class for managing memory zones.
Definition: NXZone.h:23
size_t bytesUsed()
Returns the used size of the memory zone.
size_t bytesTotal()
Returns the total size of the memory zone.
The base class for objects in the Foundation framework.
Definition: NXObject.h:21
id defaultZone()
Returns the default memory zone.
struct objc_object * id
A pointer to an instance of a class.
Definition: runtime.h:18
size_t _size
Initial allocated size of the memory zone in bytes.
Definition: NXZone.h:25