mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=565
This commit is contained in:
parent
13fd9c2cb0
commit
a20cb99361
|
@ -214,8 +214,21 @@ int get_host_info(HOST_INFO& host) {
|
|||
sysinfo(SI_RELEASE, host.os_version, sizeof(host.os_version));
|
||||
sysinfo(SI_HW_SERIAL, host.serialnum, sizeof(host.serialnum));
|
||||
host.p_ncpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
||||
/* There can be a variety of methods to obtain amount of
|
||||
* usable memory. You will have to check your sysconf()
|
||||
* defines, probably in unistd.h
|
||||
* - 2002-11-03 hiram@users.sourceforge.net
|
||||
*/
|
||||
#if defined(_SC_USEABLE_MEMORY)
|
||||
host.m_nbytes = (double)sysconf(_SC_PAGESIZE)
|
||||
* (double)sysconf(_SC_PHYS_PAGES);
|
||||
* (double)sysconf(_SC_USEABLE_MEMORY); /* UnixWare */
|
||||
#elif defined(_SC_PHYS_PAGES)
|
||||
host.m_nbytes = (double)sysconf(_SC_PAGESIZE)
|
||||
* (double)sysconf(_SC_PHYS_PAGES); /* Linux */
|
||||
#else
|
||||
#error Need to specify a sysconf() define to obtain memory size
|
||||
#endif
|
||||
|
||||
swaptbl_t* s;
|
||||
n = swapctl(SC_GETNSWP, 0);
|
||||
|
|
|
@ -80,8 +80,8 @@ int check_cache_size(int mem_size) {
|
|||
fprintf(stderr, "error: check_cache_size: negative mem_size\n");
|
||||
return ERR_NEG;
|
||||
}
|
||||
logStride = (int)(log(STRIDE_MAX/STRIDE_MIN)/log(2))+1;
|
||||
logCache = (int)(log(CACHE_MAX/CACHE_MIN)/log(2))+1;
|
||||
logStride = (int)(log(STRIDE_MAX/STRIDE_MIN)/log(2.0))+1;
|
||||
logCache = (int)(log(CACHE_MAX/CACHE_MIN)/log(2.0))+1;
|
||||
|
||||
printf("Test will take about %.2f seconds.\n", SECS_PER_RUN*logStride*logCache);
|
||||
results = (double **)malloc(sizeof(double *)*logStride);
|
||||
|
|
Loading…
Reference in New Issue