Don't use non-portable ceilf() function -- use a simple integer
calculation to get the same result instead. This commit was SVN r5066.
Этот коммит содержится в:
родитель
a763345491
Коммит
6c316d58dd
@ -236,14 +236,14 @@ int orte_dps_buffer_extend(orte_buffer_t *bptr, size_t mem_req)
|
||||
int pages;
|
||||
void* newbaseptr;
|
||||
int num_pages;
|
||||
float frac_pages;
|
||||
ssize_t mdiff;
|
||||
size_t sdiff; /* difference (increase) in space */
|
||||
|
||||
/* how many pages are required */
|
||||
frac_pages = (float)mem_req/(float)orte_dps_page_size;
|
||||
frac_pages = ceilf(frac_pages);
|
||||
num_pages = (int)frac_pages;
|
||||
num_pages = mem_req / orte_dps_page_size;
|
||||
if (0 != mem_req % orte_dps_page_size) {
|
||||
++num_pages;
|
||||
}
|
||||
|
||||
/* push up page count */
|
||||
pages = bptr->pages + num_pages;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user