picofuse-objc

NXZone.h
Go to the documentation of this file.
1 
5 #pragma once
6 #include <picofuse/sys.h>
7 
24 @interface NXZone : NXObject {
25 @private
26  size_t _size;
27  sys_mem_arena_t *_arena;
28 }
29 
35 + (NXZone *)defaultZone;
36 
46 + (id)zoneWithSize:(size_t)size;
47 
52 - (void)dealloc;
53 
60 - (void *)allocWithSize:(size_t)size;
61 
67 - (void)free:(void *)ptr;
68 
72 - (size_t)count;
73 
77 - (size_t)bytesTotal;
78 
82 - (size_t)bytesUsed;
83 
88 - (size_t)bytesFree;
89 
90 @end
size_t bytesFree()
Returns the number of bytes which aren&#39;t allocated.
void dealloc()
Frees the zone and its memory.
NXZone * defaultZone()
Returns the default zone.
A region of memory, from which objects and other memory can be allocated.
Definition: NXZone.h:24
size_t bytesUsed()
Returns the number of bytes which are allocated.
size_t bytesTotal()
Returns the capacity of the zone in bytes.
The base class for objects in the Foundation framework.
Definition: NXObject.h:28
struct objc_object * id
A pointer to an instance of a class.
Definition: runtime.h:18
size_t count()
Returns the number of blocks of memory which are allocated.