mirror of https://github.com/CGAL/cgal
Port to Linux 64 bits
This commit is contained in:
parent
36b7e51dc0
commit
a1e58fff56
|
|
@ -72,7 +72,7 @@ extern "C"
|
||||||
/* (see taucs_memory.c) */
|
/* (see taucs_memory.c) */
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
|
||||||
#ifdef OSTYPE_linux
|
#if defined(OSTYPE_linux) || defined(OSTYPE_linux64)
|
||||||
|
|
||||||
/* Redirect call to avoid link error */
|
/* Redirect call to avoid link error */
|
||||||
#define taucs_system_memory_size cgal_taucs_system_memory_size
|
#define taucs_system_memory_size cgal_taucs_system_memory_size
|
||||||
|
|
@ -147,7 +147,7 @@ inline double taucs_available_memory_size()
|
||||||
{
|
{
|
||||||
/* LS 2007: The original code below creates an infinite loop on Linux */
|
/* LS 2007: The original code below creates an infinite loop on Linux */
|
||||||
/* (optimistic memory allocation => malloc() never returns NULL) */
|
/* (optimistic memory allocation => malloc() never returns NULL) */
|
||||||
#ifndef OSTYPE_linux
|
#if !defined(OSTYPE_linux) && !defined(OSTYPE_linux64)
|
||||||
|
|
||||||
double m_sys;
|
double m_sys;
|
||||||
double m,m_low,m_high,m_tol;
|
double m,m_low,m_high,m_tol;
|
||||||
|
|
@ -169,7 +169,7 @@ inline double taucs_available_memory_size()
|
||||||
|
|
||||||
while ( (m < m_max-1) /* m_max not reached */
|
while ( (m < m_max-1) /* m_max not reached */
|
||||||
&& ((p=(char*) taucs_malloc( (size_t) limit_memory(m*2.0) )) != NULL) ) {
|
&& ((p=(char*) taucs_malloc( (size_t) limit_memory(m*2.0) )) != NULL) ) {
|
||||||
taucs_printf("taucs_avail_memory_size: %.0lf Mb\n", limit_memory(m*2.0) / 1048576.0);
|
taucs_printf("taucs_available_memory_size: %.0lf Mb\n", limit_memory(m*2.0) / 1048576.0);
|
||||||
taucs_free(p);
|
taucs_free(p);
|
||||||
m = limit_memory(m*2.0);
|
m = limit_memory(m*2.0);
|
||||||
}
|
}
|
||||||
|
|
@ -180,7 +180,7 @@ inline double taucs_available_memory_size()
|
||||||
|
|
||||||
while ( m_high - m_low > m_tol ) {
|
while ( m_high - m_low > m_tol ) {
|
||||||
m = m_low + ( (m_high-m_low)/2.0 );
|
m = m_low + ( (m_high-m_low)/2.0 );
|
||||||
taucs_printf("taucs_avail_memory_size: [%.0lf %.0lf %.0lf]\n",
|
taucs_printf("taucs_available_memory_size: [%.0lf %.0lf %.0lf]\n",
|
||||||
m_low / 1048576.0,
|
m_low / 1048576.0,
|
||||||
m / 1048576.0,
|
m / 1048576.0,
|
||||||
m_high / 1048576.0);
|
m_high / 1048576.0);
|
||||||
|
|
@ -193,7 +193,7 @@ inline double taucs_available_memory_size()
|
||||||
|
|
||||||
m = m_low;
|
m = m_low;
|
||||||
|
|
||||||
taucs_printf("taucs_avail_memory_size: malloc test=%.0lf MB sys test=%.0lf MB\n",
|
taucs_printf("taucs_available_memory_size: malloc test=%.0lf MB sys test=%.0lf MB\n",
|
||||||
m / 1048576.0,
|
m / 1048576.0,
|
||||||
m_sys / 1048576.0
|
m_sys / 1048576.0
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue