Mercurial > hg > octave-max
changeset 4142:0739d46e778c
[project @ 2002-11-01 14:10:27 by jwe]
author | jwe |
---|---|
date | Fri, 01 Nov 2002 14:10:27 +0000 |
parents | 8c710385c572 |
children | 62afb31c1f85 |
files | liboctave/Array2.cc liboctave/ArrayN.cc liboctave/ChangeLog |
diffstat | 3 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array2.cc +++ b/liboctave/Array2.cc @@ -44,6 +44,9 @@ // Two dimensional array class. +// A guess (should be quite conservative). +#define MALLOC_OVERHEAD 1024 + template <class T> int Array2<T>::get_size (int r, int c) const @@ -57,9 +60,6 @@ // most current hardware, but not so large to cause the // allocator to barf on computing retval * sizeof (T). - // A guess (should be quite conservative). - static const int MALLOC_OVERHEAD = 1024; - static int nl; static double dl = frexp (static_cast<double> @@ -89,6 +89,8 @@ return (nt < nl || (nt == nl && dt < dl)) ? r * c : max_items; } +#undef MALLOC_OVERHEAD + template <class T> T Array2<T>::range_error (const char *fcn, int i, int j) const
--- a/liboctave/ArrayN.cc +++ b/liboctave/ArrayN.cc @@ -69,6 +69,9 @@ return retval; } +// A guess (should be quite conservative). +#define MALLOC_OVERHEAD 1024 + template <class T> int ArrayN<T>::get_size (const Array<int>& arr_idx) @@ -82,9 +85,6 @@ // most current hardware, but not so large to cause the // allocator to barf on computing retval * sizeof (T). - // A guess (should be quite conservative). - static const int MALLOC_OVERHEAD = 1024; - static int nl; static double dl = frexp (static_cast<double> @@ -131,6 +131,8 @@ return retval; } +#undef MALLOC_OVERHEAD + template <class T> T ArrayN<T>::range_error (const char *fcn, const Array<int>& arr_idx) const
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2002-11-01 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array2.cc (Array2<T>::get_size): #define MALLOC_OVERHEAD to + avoid OS X linker bug. + * ArrayN.cc (ArrayN<T>::get_size): Likewise. + 2002-10-31 John W. Eaton <jwe@bevo.che.wisc.edu> * ODESFunc.h (ODESFunc::ODES_fsub, ODESFunc::ODES_bsub,