224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
}
if OF_UNLIKELY (extra != NULL)
*extra = (char*)instance + instanceSize + extraAlignment;
return instance;
}
const char*
_NSPrintForDebugger(id object)
{
return [[object description]
cStringWithEncoding: OF_STRING_ENCODING_NATIVE];
}
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
}
if OF_UNLIKELY (extra != NULL)
*extra = (char*)instance + instanceSize + extraAlignment;
return instance;
}
uint32_t
of_random()
{
#if defined(OF_HAVE_ARC4RANDOM)
return arc4random();
#elif defined(OF_HAVE_RANDOM)
static BOOL initialized = NO;
if (!initialized) {
struct timeval t;
gettimeofday(&t, NULL);
srandom(t.tv_sec ^ t.tv_usec);
initialized = YES;
}
return (random() << 16) | (random() & 0xFFFF);
#else
static BOOL initialized = NO;
if (!initialized) {
struct timeval t;
gettimeofday(&t, NULL);
srand(t.tv_sec ^ t.tv_usec);
initialized = YES;
}
return (random() << 16) | (random() & 0xFFFF);
#endif
}
const char*
_NSPrintForDebugger(id object)
{
return [[object description]
cStringWithEncoding: OF_STRING_ENCODING_NATIVE];
}
|
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
of_pagesize = 4096;
# ifdef _SC_NPROCESSORS_CONF
if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)
# endif
of_num_cpus = 1;
#endif
#if defined(OF_HAVE_ARC4RANDOM)
of_hash_seed = arc4random();
#elif defined(OF_HAVE_RANDOM)
struct timeval t;
gettimeofday(&t, NULL);
srandom(t.tv_usec);
of_hash_seed = random();
#else
struct timeval t;
gettimeofday(&t, NULL);
srand(t.tv_usec);
of_hash_seed = rand();
#endif
}
+ (void)initialize
{
}
+ alloc
|
<
<
<
<
<
<
<
<
<
<
<
|
<
|
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
of_pagesize = 4096;
# ifdef _SC_NPROCESSORS_CONF
if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)
# endif
of_num_cpus = 1;
#endif
of_hash_seed = of_random();
}
+ (void)initialize
{
}
+ alloc
|