21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#import "OFObject.h"
#import "OFAutoreleasePool.h"
#import "OFAllocFailedException.h"
#import "OFEnumerationMutationException.h"
#import "OFInitializationFailedException.h"
|
>
>
>
>
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#ifdef __QNX__
# include <sys/syspage.h>
#endif
#import "OFObject.h"
#import "OFAutoreleasePool.h"
#import "OFAllocFailedException.h"
#import "OFEnumerationMutationException.h"
#import "OFInitializationFailedException.h"
|
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
}
#if defined(_WIN32)
SYSTEM_INFO si;
GetSystemInfo(&si);
of_pagesize = si.dwPageSize;
of_num_cpus = si.dwNumberOfProcessors;
#else
# ifdef _SC_PAGESIZE
if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
# endif
of_pagesize = 4096;
# ifdef _SC_NPROCESSORS_CONF
if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)
|
>
>
>
>
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
}
#if defined(_WIN32)
SYSTEM_INFO si;
GetSystemInfo(&si);
of_pagesize = si.dwPageSize;
of_num_cpus = si.dwNumberOfProcessors;
#elif defined(__QNX__)
if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
of_pagesize = 4096;
of_num_cpus = _syspage_ptr->num_cpu;
#else
# ifdef _SC_PAGESIZE
if ((of_pagesize = sysconf(_SC_PAGESIZE)) < 1)
# endif
of_pagesize = 4096;
# ifdef _SC_NPROCESSORS_CONF
if ((of_num_cpus = sysconf(_SC_NPROCESSORS_CONF)) < 1)
|