10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <assert.h>
#import "OFObject.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"
#import "macros.h"
#import <objc/objc-api.h>
#ifdef OF_APPLE_RUNTIME
# import <objc/runtime.h>
#endif
#ifdef OF_GNU_RUNTIME
# import <objc/sarray.h>
#endif
#ifdef OF_ATOMIC_OPS
# import "atomic.h"
#else
# import "threading.h"
#endif
|
>
>
>
>
>
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include <assert.h>
#import "OFObject.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"
#import "macros.h"
#import <objc/objc-api.h>
#ifdef OF_APPLE_RUNTIME
# import <objc/runtime.h>
#endif
#ifdef OF_GNU_RUNTIME
# import <objc/sarray.h>
#endif
#ifdef _WIN32
# include <windows.h>
#endif
#ifdef OF_ATOMIC_OPS
# import "atomic.h"
#else
# import "threading.h"
#endif
|
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/* Hopefully no arch needs more than 16 bytes padding */
#define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15)
#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN))
static struct {
Class isa;
} alloc_failed_exception;
#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif
#ifdef NEED_OBJC_PROPERTIES_INIT
extern BOOL objc_properties_init();
|
>
>
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/* Hopefully no arch needs more than 16 bytes padding */
#define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15)
#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN))
static struct {
Class isa;
} alloc_failed_exception;
size_t of_pagesize;
#ifdef NEED_OBJC_SYNC_INIT
extern BOOL objc_sync_init();
#endif
#ifdef NEED_OBJC_PROPERTIES_INIT
extern BOOL objc_properties_init();
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
abort();
}
#endif
#ifdef OF_APPLE_RUNTIME
objc_setEnumerationMutationHandler(enumeration_mutation_handler);
#endif
}
+ (void)initialize
{
}
+ alloc
|
>
>
>
>
>
>
>
>
>
|
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
abort();
}
#endif
#ifdef OF_APPLE_RUNTIME
objc_setEnumerationMutationHandler(enumeration_mutation_handler);
#endif
#ifndef _WIN32
if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
of_pagesize = 4096;
#else
SYSTEM_INFO si;
GetSystemInfo(&si);
of_pagesize = si.dwPageSize;
#endif
}
+ (void)initialize
{
}
+ alloc
|