# HG changeset patch # User John W. Eaton # Date 1421779409 18000 # Node ID 76478d2da117175a1b112435b8c02821c05b4a29 # Parent db92e7e28e1fd3f18e0f5cf6046a722b041cb21d unconditionally disable the octave_allocator class * configure.ac: Delete the --enable-octave-allocator option. * oct-alloc.h: Delete octave_allocator class. Warn if file is included. Unconditionally define macros to be empty. * NEWS: Make note of these changes. * oct-alloc.cc: Delete. * liboctave/util/module.mk (UTIL_SRC): Remove it from the list. * make_int.cc, Cell.h, oct-obj.cc, oct-obj.h, audiodevinfo.cc, ov-base-int.h, ov-base-scalar.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.h, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h, ov-complex.cc, ov-complex.h, ov-cs-list.cc, ov-cs-list.h, ov-cx-diag.cc, ov-cx-diag.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn-inline.cc, ov-fcn-inline.h, ov-fcn.cc, ov-fcn.h, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-diag.cc, ov-flt-cx-diag.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-diag.cc, ov-flt-re-diag.h, ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-int16.cc, ov-int32.cc, ov-int64.cc, ov-int8.cc, ov-intx.h, ov-java.cc, ov-java.h, ov-mex-fcn.cc, ov-mex-fcn.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-range.h, ov-re-diag.cc, ov-re-diag.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h, ov-uint16.cc, ov-uint32.cc, ov-uint64.cc, ov-uint8.cc, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc, ov.h, pt-const.cc, pt-const.h, idx-vector.cc, idx-vector.h: Delete uses of oct-alloc.h and OCTAVE_ALLOCATOR macros. diff -r db92e7e28e1f -r 76478d2da117 NEWS --- a/NEWS Tue Jan 20 10:29:54 2015 -0500 +++ b/NEWS Tue Jan 20 13:43:29 2015 -0500 @@ -205,6 +205,13 @@ ** The warning ID Octave:singular-matrix-div has been replaced by Octave:nearly-singular-matrix and Octave:singular-matrix. + ** The configure option --enable-octave-allocator has been removed. + The internal class declared in oct-alloc.h has + been removed. The header remains, but is deprecated. The macros to + access the class (DECLARE_OCTAVE_ALLOCATOR, DEFINE_OCTAVE_ALLOCATOR, + and DEFINE_OCTAVE_ALLOCATOR2) are now unconditionally defined to be + empty. + Summary of important user-visible changes for version 4.0: --------------------------------------------------------- diff -r db92e7e28e1f -r 76478d2da117 configure.ac --- a/configure.ac Tue Jan 20 10:29:54 2015 -0500 +++ b/configure.ac Tue Jan 20 13:43:29 2015 -0500 @@ -232,19 +232,6 @@ AC_DEFINE(BOUNDS_CHECKING, 1, [Define to 1 to use internal bounds checking.]) fi -### Use Octave's built-in memory allocator rather than straightforward malloc. -### Disabled by default. - -USE_OCTAVE_ALLOCATOR=no -AC_ARG_ENABLE([octave-allocator], - [AS_HELP_STRING([--enable-octave-allocator], - [use the obsolete octave_allocator class for many of Octave's objects (mostly octave_value types). You probably do NOT want to enable this feature.])], - [if test "$enableval" = yes; then USE_OCTAVE_ALLOCATOR=yes; fi], []) -if test $USE_OCTAVE_ALLOCATOR = yes; then - AC_DEFINE(USE_OCTAVE_ALLOCATOR, 1, - [Define to 1 to use octave_allocator class.]) -fi - ### Use atomic operations for internal reference counting. This is required ### for thread-safe behavior (Qt Handles) but incurs a significant slowdown. ### Enabled by default until a higher performing solution can be found. @@ -3093,7 +3080,6 @@ JIT compiler for loops: $build_jit Build Java interface: $build_java Do internal array bounds checking: $BOUNDS_CHECKING - Use octave_allocator: $USE_OCTAVE_ALLOCATOR Build static libraries: $STATIC_LIBS Build shared libraries: $SHARED_LIBS Dynamic Linking: $ENABLE_DYNAMIC_LINKING $DL_API_MSG @@ -3187,15 +3173,6 @@ AC_MSG_WARN([for plotting.]) AC_MSG_WARN([]) fi -if test $USE_ATOMIC_REFCOUNT = yes; then - if test $USE_OCTAVE_ALLOCATOR = yes; then - AC_MSG_WARN([Using atomic reference counting.]) - AC_MSG_WARN([Thread-safe behavior is not guaranteed unless the]) - AC_MSG_WARN([octave_allocator class is also disabled.]) - AC_MSG_WARN([]) - fi - warn_msg_printed=true -fi if $warn_msg_printed; then AC_MSG_NOTICE([]) diff -r db92e7e28e1f -r 76478d2da117 examples/code/make_int.cc --- a/examples/code/make_int.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/examples/code/make_int.cc Tue Jan 20 13:43:29 2015 -0500 @@ -108,7 +108,6 @@ int scalar; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; @@ -311,6 +310,5 @@ return retval; } -DEFINE_OCTAVE_ALLOCATOR (octave_integer); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_integer, "integer", "integer"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/corefcn/Cell.h --- a/libinterp/corefcn/Cell.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/corefcn/Cell.h Tue Jan 20 13:43:29 2015 -0500 @@ -27,7 +27,6 @@ #include #include "Array.h" -#include "oct-alloc.h" #include "str-vec.h" #include "ov.h" diff -r db92e7e28e1f -r 76478d2da117 libinterp/corefcn/oct-obj.cc --- a/libinterp/corefcn/oct-obj.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/corefcn/oct-obj.cc Tue Jan 20 13:43:29 2015 -0500 @@ -31,7 +31,6 @@ // We are likely to have a lot of octave_value_list objects to allocate, // so make the grow_size large. -DEFINE_OCTAVE_ALLOCATOR2(octave_value_list, 1024); octave_value_list::octave_value_list (const std::list& lst) { diff -r db92e7e28e1f -r 76478d2da117 libinterp/corefcn/oct-obj.h --- a/libinterp/corefcn/oct-obj.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/corefcn/oct-obj.h Tue Jan 20 13:43:29 2015 -0500 @@ -27,7 +27,6 @@ #include #include -#include "oct-alloc.h" #include "str-vec.h" #include "Array.h" @@ -170,7 +169,6 @@ const octave_value& elem (octave_idx_type n) const { return data(n); } - DECLARE_OCTAVE_ALLOCATOR }; // Make it easy to build argument lists for built-in functions or for diff -r db92e7e28e1f -r 76478d2da117 libinterp/dldfcn/audiodevinfo.cc --- a/libinterp/dldfcn/audiodevinfo.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/dldfcn/audiodevinfo.cc Tue Jan 20 13:43:29 2015 -0500 @@ -545,13 +545,11 @@ PaStreamParameters output_parameters; audio_type type; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; static const unsigned int BUFFER_SIZE = 8192; -DEFINE_OCTAVE_ALLOCATOR (audioplayer); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (audioplayer, "audioplayer", "audioplayer"); static int @@ -1361,11 +1359,9 @@ PaStreamParameters input_parameters; audio_type type; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; -DEFINE_OCTAVE_ALLOCATOR (audiorecorder); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (audiorecorder, "audiorecorder", "audiorecorder"); static int diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-base-int.h --- a/libinterp/octave-value/ov-base-int.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-base-int.h Tue Jan 20 13:43:29 2015 -0500 @@ -29,7 +29,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-base-scalar.h --- a/libinterp/octave-value/ov-base-scalar.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-base-scalar.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include "lo-mappers.h" #include "lo-utils.h" -#include "oct-alloc.h" #include "str-vec.h" #include "MatrixType.h" diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-bool-mat.cc --- a/libinterp/octave-value/ov-bool-mat.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-bool-mat.cc Tue Jan 20 13:43:29 2015 -0500 @@ -52,7 +52,6 @@ template class octave_base_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_bool_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_bool_matrix, "bool matrix", "logical"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-bool-mat.h --- a/libinterp/octave-value/ov-bool-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-bool-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "error.h" #include "oct-stream.h" @@ -232,7 +231,6 @@ protected: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-bool-sparse.cc --- a/libinterp/octave-value/ov-bool-sparse.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-bool-sparse.cc Tue Jan 20 13:43:29 2015 -0500 @@ -49,7 +49,6 @@ template class OCTINTERP_API octave_base_sparse; -DEFINE_OCTAVE_ALLOCATOR (octave_sparse_bool_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_bool_matrix, "sparse bool matrix", "logical"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-bool-sparse.h --- a/libinterp/octave-value/ov-bool-sparse.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-bool-sparse.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -153,7 +152,6 @@ protected: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-bool.cc --- a/libinterp/octave-value/ov-bool.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-bool.cc Tue Jan 20 13:43:29 2015 -0500 @@ -46,7 +46,6 @@ template class octave_base_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_bool); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_bool, "bool", "logical"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-bool.h --- a/libinterp/octave-value/ov-bool.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-bool.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include "lo-utils.h" #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "oct-stream.h" @@ -244,7 +243,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-builtin.cc --- a/libinterp/octave-value/ov-builtin.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-builtin.cc Tue Jan 20 13:43:29 2015 -0500 @@ -33,7 +33,6 @@ #include "toplev.h" #include "unwind-prot.h" -DEFINE_OCTAVE_ALLOCATOR (octave_builtin); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_builtin, "built-in function", diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-builtin.h --- a/libinterp/octave-value/ov-builtin.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-builtin.h Tue Jan 20 13:43:29 2015 -0500 @@ -110,7 +110,6 @@ octave_builtin& operator = (const octave_builtin& ob); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cell.cc --- a/libinterp/octave-value/ov-cell.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cell.cc Tue Jan 20 13:43:29 2015 -0500 @@ -124,7 +124,6 @@ template class octave_base_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_cell); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_cell, "cell", "cell"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cell.h --- a/libinterp/octave-value/ov-cell.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cell.h Tue Jan 20 13:43:29 2015 -0500 @@ -31,7 +31,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "Cell.h" @@ -183,7 +182,6 @@ mutable std::auto_ptr > cellstr_cache; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-ch-mat.h --- a/libinterp/octave-value/ov-ch-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-ch-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-class.cc --- a/libinterp/octave-value/ov-class.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-class.cc Tue Jan 20 13:43:29 2015 -0500 @@ -57,7 +57,6 @@ #include "unwind-prot.h" #include "variables.h" -DEFINE_OCTAVE_ALLOCATOR(octave_class); int octave_class::t_id (-1); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-class.h --- a/libinterp/octave-value/ov-class.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-class.h Tue Jan 20 13:43:29 2015 -0500 @@ -33,7 +33,6 @@ #include "str-vec.h" #include "error.h" -#include "oct-alloc.h" #include "oct-map.h" #include "ov-base.h" #include "ov-typeinfo.h" @@ -207,7 +206,6 @@ octave_map map; - DECLARE_OCTAVE_ALLOCATOR public: int type_id (void) const { return t_id; } diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-classdef.cc --- a/libinterp/octave-value/ov-classdef.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-classdef.cc Tue Jan 20 13:43:29 2015 -0500 @@ -875,7 +875,6 @@ //---------------------------------------------------------------------------- -DEFINE_OCTAVE_ALLOCATOR (octave_classdef); int octave_classdef::t_id (-1); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-classdef.h --- a/libinterp/octave-value/ov-classdef.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-classdef.h Tue Jan 20 13:43:29 2015 -0500 @@ -1477,7 +1477,6 @@ cdef_object object; private: - DECLARE_OCTAVE_ALLOCATOR public: int type_id (void) const { return t_id; } diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-complex.cc --- a/libinterp/octave-value/ov-complex.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-complex.cc Tue Jan 20 13:43:29 2015 -0500 @@ -50,7 +50,6 @@ template class octave_base_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_complex); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_complex, "complex scalar", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-complex.h --- a/libinterp/octave-value/ov-complex.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-complex.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include "lo-ieee.h" #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "gripes.h" @@ -198,7 +197,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cs-list.cc --- a/libinterp/octave-value/ov-cs-list.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cs-list.cc Tue Jan 20 13:43:29 2015 -0500 @@ -35,7 +35,6 @@ #include "ov-cs-list.h" #include "unwind-prot.h" -DEFINE_OCTAVE_ALLOCATOR (octave_cs_list); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_cs_list, "cs-list", "cs-list"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cs-list.h --- a/libinterp/octave-value/ov-cs-list.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cs-list.h Tue Jan 20 13:43:29 2015 -0500 @@ -33,7 +33,6 @@ #include "Cell.h" #include "error.h" -#include "oct-alloc.h" #include "oct-obj.h" #include "ov-typeinfo.h" @@ -83,7 +82,6 @@ // The list of Octave values. octave_value_list lst; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cx-diag.cc --- a/libinterp/octave-value/ov-cx-diag.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cx-diag.cc Tue Jan 20 13:43:29 2015 -0500 @@ -36,7 +36,6 @@ template class octave_base_diag; -DEFINE_OCTAVE_ALLOCATOR (octave_complex_diag_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_complex_diag_matrix, "complex diagonal matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cx-diag.h --- a/libinterp/octave-value/ov-cx-diag.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cx-diag.h Tue Jan 20 13:43:29 2015 -0500 @@ -89,7 +89,6 @@ bool chk_valid_scalar (const octave_value&, Complex&) const; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cx-mat.cc --- a/libinterp/octave-value/ov-cx-mat.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cx-mat.cc Tue Jan 20 13:43:29 2015 -0500 @@ -58,7 +58,6 @@ template class octave_base_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_complex_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_complex_matrix, "complex matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cx-mat.h --- a/libinterp/octave-value/ov-cx-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cx-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -177,7 +176,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cx-sparse.cc --- a/libinterp/octave-value/ov-cx-sparse.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cx-sparse.cc Tue Jan 20 13:43:29 2015 -0500 @@ -49,7 +49,6 @@ template class OCTINTERP_API octave_base_sparse; -DEFINE_OCTAVE_ALLOCATOR (octave_sparse_complex_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_complex_matrix, "sparse complex matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-cx-sparse.h --- a/libinterp/octave-value/ov-cx-sparse.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-cx-sparse.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -154,7 +153,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-dld-fcn.cc --- a/libinterp/octave-value/ov-dld-fcn.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-dld-fcn.cc Tue Jan 20 13:43:29 2015 -0500 @@ -33,7 +33,6 @@ #include "ov-dld-fcn.h" #include "ov.h" -DEFINE_OCTAVE_ALLOCATOR (octave_dld_function); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_dld_function, "dynamically-linked function", diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-dld-fcn.h --- a/libinterp/octave-value/ov-dld-fcn.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-dld-fcn.h Tue Jan 20 13:43:29 2015 -0500 @@ -95,7 +95,6 @@ octave_dld_function& operator = (const octave_dld_function& fn); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-fcn-handle.cc --- a/libinterp/octave-value/ov-fcn-handle.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-fcn-handle.cc Tue Jan 20 13:43:29 2015 -0500 @@ -64,7 +64,6 @@ #include "ls-oct-binary.h" #include "ls-utils.h" -DEFINE_OCTAVE_ALLOCATOR (octave_fcn_handle); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_handle, "function handle", diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-fcn-handle.h --- a/libinterp/octave-value/ov-fcn-handle.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-fcn-handle.h Tue Jan 20 13:43:29 2015 -0500 @@ -28,7 +28,6 @@ #include #include -#include "oct-alloc.h" #include "ov-base.h" #include "ov-base-mat.h" @@ -164,7 +163,6 @@ bool set_fcn (const std::string &octaveroot, const std::string& fpath); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-fcn-inline.cc --- a/libinterp/octave-value/ov-fcn-inline.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-fcn-inline.cc Tue Jan 20 13:43:29 2015 -0500 @@ -53,7 +53,6 @@ #include "ls-hdf5.h" #include "ls-utils.h" -DEFINE_OCTAVE_ALLOCATOR (octave_fcn_inline); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_fcn_inline, "inline function", diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-fcn-inline.h --- a/libinterp/octave-value/ov-fcn-inline.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-fcn-inline.h Tue Jan 20 13:43:29 2015 -0500 @@ -26,7 +26,6 @@ #include #include -#include "oct-alloc.h" #include "ov-base.h" #include "ov-base-mat.h" @@ -92,7 +91,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-fcn.cc --- a/libinterp/octave-value/ov-fcn.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-fcn.cc Tue Jan 20 13:43:29 2015 -0500 @@ -28,7 +28,6 @@ #include "oct-obj.h" #include "ov-fcn.h" -DEFINE_OCTAVE_ALLOCATOR (octave_function); octave_base_value * octave_function::clone (void) const diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-fcn.h --- a/libinterp/octave-value/ov-fcn.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-fcn.h Tue Jan 20 13:43:29 2015 -0500 @@ -28,7 +28,6 @@ #include "oct-time.h" #include "str-vec.h" -#include "oct-alloc.h" #include "oct-obj.h" #include "ov-base.h" #include "ov-typeinfo.h" @@ -223,7 +222,6 @@ octave_function& operator = (const octave_function& f); - DECLARE_OCTAVE_ALLOCATOR }; #endif diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-float.cc --- a/libinterp/octave-value/ov-float.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-float.cc Tue Jan 20 13:43:29 2015 -0500 @@ -53,7 +53,6 @@ template class octave_base_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_float_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_scalar, "float scalar", "single"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-float.h --- a/libinterp/octave-value/ov-float.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-float.h Tue Jan 20 13:43:29 2015 -0500 @@ -32,7 +32,6 @@ #include "lo-mappers.h" #include "lo-utils.h" #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "gripes.h" @@ -254,7 +253,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-complex.cc --- a/libinterp/octave-value/ov-flt-complex.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-complex.cc Tue Jan 20 13:43:29 2015 -0500 @@ -50,7 +50,6 @@ template class octave_base_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_float_complex); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_complex, "float complex scalar", "single"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-complex.h --- a/libinterp/octave-value/ov-flt-complex.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-complex.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include "lo-ieee.h" #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "gripes.h" @@ -189,7 +188,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-cx-diag.cc --- a/libinterp/octave-value/ov-flt-cx-diag.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-cx-diag.cc Tue Jan 20 13:43:29 2015 -0500 @@ -35,7 +35,6 @@ template class octave_base_diag; -DEFINE_OCTAVE_ALLOCATOR (octave_float_complex_diag_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_complex_diag_matrix, "float complex diagonal matrix", "single"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-cx-diag.h --- a/libinterp/octave-value/ov-flt-cx-diag.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-cx-diag.h Tue Jan 20 13:43:29 2015 -0500 @@ -87,7 +87,6 @@ bool chk_valid_scalar (const octave_value&, FloatComplex&) const; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-cx-mat.cc --- a/libinterp/octave-value/ov-flt-cx-mat.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-cx-mat.cc Tue Jan 20 13:43:29 2015 -0500 @@ -62,7 +62,6 @@ template class octave_base_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_float_complex_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_complex_matrix, "float complex matrix", "single"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-cx-mat.h --- a/libinterp/octave-value/ov-flt-cx-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-cx-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -175,7 +174,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-re-diag.cc --- a/libinterp/octave-value/ov-flt-re-diag.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-re-diag.cc Tue Jan 20 13:43:29 2015 -0500 @@ -34,7 +34,6 @@ template class octave_base_diag; -DEFINE_OCTAVE_ALLOCATOR (octave_float_diag_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_diag_matrix, "float diagonal matrix", "single"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-re-diag.h --- a/libinterp/octave-value/ov-flt-re-diag.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-re-diag.h Tue Jan 20 13:43:29 2015 -0500 @@ -87,7 +87,6 @@ bool chk_valid_scalar (const octave_value&, float&) const; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-re-mat.cc --- a/libinterp/octave-value/ov-flt-re-mat.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-re-mat.cc Tue Jan 20 13:43:29 2015 -0500 @@ -70,7 +70,6 @@ template class octave_base_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_float_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_float_matrix, "float matrix", "single"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-flt-re-mat.h --- a/libinterp/octave-value/ov-flt-re-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-flt-re-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -210,7 +209,6 @@ octave_value map (unary_mapper_t umap) const; private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-int16.cc --- a/libinterp/octave-value/ov-int16.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-int16.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_int16_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int16_matrix, "int16 matrix", "int16"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_int16_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int16_scalar, "int16 scalar", "int16"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-int32.cc --- a/libinterp/octave-value/ov-int32.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-int32.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_int32_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int32_matrix, "int32 matrix", "int32"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_int32_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int32_scalar, "int32 scalar", "int32"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-int64.cc --- a/libinterp/octave-value/ov-int64.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-int64.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_int64_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int64_matrix, "int64 matrix", "int64"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_int64_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int64_scalar, "int64 scalar", "int64"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-int8.cc --- a/libinterp/octave-value/ov-int8.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-int8.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_int8_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int8_matrix, "int8 matrix", "int8"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_int8_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_int8_scalar, "int8 scalar", "int8"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-intx.h --- a/libinterp/octave-value/ov-intx.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-intx.h Tue Jan 20 13:43:29 2015 -0500 @@ -27,7 +27,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -375,7 +374,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; @@ -680,7 +678,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-java.cc --- a/libinterp/octave-value/ov-java.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-java.cc Tue Jan 20 13:43:29 2015 -0500 @@ -1569,7 +1569,6 @@ // octave_java class definition -DEFINE_OCTAVE_ALLOCATOR (octave_java); int octave_java::t_id (-1); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-java.h --- a/libinterp/octave-value/ov-java.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-java.h Tue Jan 20 13:43:29 2015 -0500 @@ -294,7 +294,6 @@ std::string java_classname; - DECLARE_OCTAVE_ALLOCATOR public: int type_id (void) const { return t_id; } diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-mex-fcn.cc --- a/libinterp/octave-value/ov-mex-fcn.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-mex-fcn.cc Tue Jan 20 13:43:29 2015 -0500 @@ -37,7 +37,6 @@ #include "toplev.h" #include "unwind-prot.h" -DEFINE_OCTAVE_ALLOCATOR (octave_mex_function); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_mex_function, "mex function", "mex function"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-mex-fcn.h --- a/libinterp/octave-value/ov-mex-fcn.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-mex-fcn.h Tue Jan 20 13:43:29 2015 -0500 @@ -114,7 +114,6 @@ octave_mex_function& operator = (const octave_mex_function& fn); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-perm.cc --- a/libinterp/octave-value/ov-perm.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-perm.cc Tue Jan 20 13:43:29 2015 -0500 @@ -418,7 +418,6 @@ return dense_cache; } -DEFINE_OCTAVE_ALLOCATOR (octave_perm_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_perm_matrix, "permutation matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-perm.h --- a/libinterp/octave-value/ov-perm.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-perm.h Tue Jan 20 13:43:29 2015 -0500 @@ -230,7 +230,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-range.cc --- a/libinterp/octave-value/ov-range.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-range.cc Tue Jan 20 13:43:29 2015 -0500 @@ -48,7 +48,6 @@ // If TRUE, allow ranges with non-integer elements as array indices. static bool Vallow_noninteger_range_as_index = true; -DEFINE_OCTAVE_ALLOCATOR (octave_range); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_range, "range", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-range.h --- a/libinterp/octave-value/ov-range.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-range.h Tue Jan 20 13:43:29 2015 -0500 @@ -33,7 +33,6 @@ #include "lo-mappers.h" #include "lo-utils.h" #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -314,7 +313,6 @@ octave_range& operator = (const octave_range&); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-re-diag.cc --- a/libinterp/octave-value/ov-re-diag.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-re-diag.cc Tue Jan 20 13:43:29 2015 -0500 @@ -35,7 +35,6 @@ template class octave_base_diag; -DEFINE_OCTAVE_ALLOCATOR (octave_diag_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_diag_matrix, "diagonal matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-re-diag.h --- a/libinterp/octave-value/ov-re-diag.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-re-diag.h Tue Jan 20 13:43:29 2015 -0500 @@ -92,7 +92,6 @@ bool chk_valid_scalar (const octave_value&, double&) const; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-re-mat.cc --- a/libinterp/octave-value/ov-re-mat.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-re-mat.cc Tue Jan 20 13:43:29 2015 -0500 @@ -70,7 +70,6 @@ template class octave_base_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_matrix, "matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-re-mat.h --- a/libinterp/octave-value/ov-re-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-re-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -234,7 +233,6 @@ octave_value map (unary_mapper_t umap) const; private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-re-sparse.cc --- a/libinterp/octave-value/ov-re-sparse.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-re-sparse.cc Tue Jan 20 13:43:29 2015 -0500 @@ -49,7 +49,6 @@ template class OCTINTERP_API octave_base_sparse; -DEFINE_OCTAVE_ALLOCATOR (octave_sparse_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_sparse_matrix, "sparse matrix", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-re-sparse.h --- a/libinterp/octave-value/ov-re-sparse.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-re-sparse.h Tue Jan 20 13:43:29 2015 -0500 @@ -30,7 +30,6 @@ #include #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "error.h" @@ -158,7 +157,6 @@ private: octave_value map (double (*fcn) (double)) const; - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-scalar.cc --- a/libinterp/octave-value/ov-scalar.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-scalar.cc Tue Jan 20 13:43:29 2015 -0500 @@ -53,7 +53,6 @@ template class octave_base_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_scalar, "scalar", "double"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-scalar.h --- a/libinterp/octave-value/ov-scalar.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-scalar.h Tue Jan 20 13:43:29 2015 -0500 @@ -32,7 +32,6 @@ #include "lo-mappers.h" #include "lo-utils.h" #include "mx-base.h" -#include "oct-alloc.h" #include "str-vec.h" #include "gripes.h" @@ -253,7 +252,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-str-mat.cc --- a/libinterp/octave-value/ov-str-mat.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-str-mat.cc Tue Jan 20 13:43:29 2015 -0500 @@ -53,8 +53,6 @@ #include "pt-mat.h" #include "utils.h" -DEFINE_OCTAVE_ALLOCATOR (octave_char_matrix_str); -DEFINE_OCTAVE_ALLOCATOR (octave_char_matrix_sq_str); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_char_matrix_str, "string", "char"); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_char_matrix_sq_str, "sq_string", diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-str-mat.h --- a/libinterp/octave-value/ov-str-mat.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-str-mat.h Tue Jan 20 13:43:29 2015 -0500 @@ -171,7 +171,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; @@ -255,7 +254,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-struct.cc --- a/libinterp/octave-value/ov-struct.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-struct.cc Tue Jan 20 13:43:29 2015 -0500 @@ -47,7 +47,6 @@ #include "ls-utils.h" #include "pr-output.h" -DEFINE_OCTAVE_ALLOCATOR(octave_struct); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_struct, "struct", "struct"); @@ -1132,7 +1131,6 @@ return retval; } -DEFINE_OCTAVE_ALLOCATOR(octave_scalar_struct); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_scalar_struct, "scalar struct", "struct"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-struct.h --- a/libinterp/octave-value/ov-struct.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-struct.h Tue Jan 20 13:43:29 2015 -0500 @@ -32,7 +32,6 @@ #include "str-vec.h" #include "error.h" -#include "oct-alloc.h" #include "oct-map.h" #include "ov-base.h" #include "ov-typeinfo.h" @@ -162,7 +161,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; @@ -283,7 +281,6 @@ octave_value to_array (void); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-uint16.cc --- a/libinterp/octave-value/ov-uint16.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-uint16.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_uint16_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint16_matrix, "uint16 matrix", "uint16"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_uint16_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint16_scalar, "uint16 scalar", "uint16"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-uint32.cc --- a/libinterp/octave-value/ov-uint32.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-uint32.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_uint32_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint32_matrix, "uint32 matrix", "uint32"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_uint32_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint32_scalar, "uint32 scalar", "uint32"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-uint64.cc --- a/libinterp/octave-value/ov-uint64.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-uint64.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_uint64_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint64_matrix, "uint64 matrix", "uint64"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_uint64_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint64_scalar, "uint64 scalar", "uint64"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-uint8.cc --- a/libinterp/octave-value/ov-uint8.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-uint8.cc Tue Jan 20 13:43:29 2015 -0500 @@ -59,7 +59,6 @@ template class octave_base_int_matrix; -DEFINE_OCTAVE_ALLOCATOR (octave_uint8_matrix); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint8_matrix, "uint8 matrix", "uint8"); @@ -68,7 +67,6 @@ template class octave_base_int_scalar; -DEFINE_OCTAVE_ALLOCATOR (octave_uint8_scalar); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_uint8_scalar, "uint8 scalar", "uint8"); diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-usr-fcn.cc --- a/libinterp/octave-value/ov-usr-fcn.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-usr-fcn.cc Tue Jan 20 13:43:29 2015 -0500 @@ -69,7 +69,6 @@ // User defined scripts. -DEFINE_OCTAVE_ALLOCATOR (octave_user_script); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_script, "user-defined script", @@ -180,7 +179,6 @@ // User defined functions. -DEFINE_OCTAVE_ALLOCATOR (octave_user_function); DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_user_function, "user-defined function", diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov-usr-fcn.h --- a/libinterp/octave-value/ov-usr-fcn.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov-usr-fcn.h Tue Jan 20 13:43:29 2015 -0500 @@ -165,7 +165,6 @@ octave_user_script& operator = (const octave_user_script& f); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; @@ -521,7 +520,6 @@ octave_user_function& operator = (const octave_user_function& fn); - DECLARE_OCTAVE_ALLOCATOR DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov.cc --- a/libinterp/octave-value/ov.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov.cc Tue Jan 20 13:43:29 2015 -0500 @@ -93,7 +93,6 @@ // We are likely to have a lot of octave_value objects to allocate, so // make the grow_size large. -DEFINE_OCTAVE_ALLOCATOR2(octave_value, 1024); // If TRUE, don't create special diagonal matrix objects. diff -r db92e7e28e1f -r 76478d2da117 libinterp/octave-value/ov.h --- a/libinterp/octave-value/ov.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/octave-value/ov.h Tue Jan 20 13:43:29 2015 -0500 @@ -35,7 +35,6 @@ #include "idx-vector.h" #include "mach-info.h" #include "mx-base.h" -#include "oct-alloc.h" #include "oct-time.h" #include "str-vec.h" @@ -1241,7 +1240,6 @@ // const octave_base_value* which actually silently calls octave_value (bool). octave_value (const octave_base_value *); - DECLARE_OCTAVE_ALLOCATOR }; // Publish externally used friend functions. diff -r db92e7e28e1f -r 76478d2da117 libinterp/parse-tree/pt-const.cc --- a/libinterp/parse-tree/pt-const.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/parse-tree/pt-const.cc Tue Jan 20 13:43:29 2015 -0500 @@ -34,7 +34,6 @@ // We are likely to have a lot of tree_constant objects to allocate, // so make the grow_size large. -DEFINE_OCTAVE_ALLOCATOR2 (tree_constant, 1024); void tree_constant::print (std::ostream& os, bool pr_as_read_syntax, diff -r db92e7e28e1f -r 76478d2da117 libinterp/parse-tree/pt-const.h --- a/libinterp/parse-tree/pt-const.h Tue Jan 20 10:29:54 2015 -0500 +++ b/libinterp/parse-tree/pt-const.h Tue Jan 20 13:43:29 2015 -0500 @@ -26,7 +26,6 @@ #include #include -#include "oct-alloc.h" class octave_value_list; class tree_walker; @@ -99,7 +98,6 @@ tree_constant& operator = (const tree_constant&); - DECLARE_OCTAVE_ALLOCATOR }; #endif diff -r db92e7e28e1f -r 76478d2da117 liboctave/array/idx-vector.cc --- a/liboctave/array/idx-vector.cc Tue Jan 20 10:29:54 2015 -0500 +++ b/liboctave/array/idx-vector.cc Tue Jan 20 13:43:29 2015 -0500 @@ -63,7 +63,6 @@ return Array (); } -DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_colon_rep); idx_vector::idx_colon_rep::idx_colon_rep (char c) { @@ -103,7 +102,6 @@ return os << ":"; } -DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_range_rep); idx_vector::idx_range_rep::idx_range_rep (octave_idx_type _start, octave_idx_type _limit, @@ -258,7 +256,6 @@ return convert_index (i, conv_error, ext); } -DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_scalar_rep); template idx_vector::idx_scalar_rep::idx_scalar_rep (T x) @@ -317,7 +314,6 @@ return Array (dim_vector (1, 1), data); } -DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_vector_rep); template idx_vector::idx_vector_rep::idx_vector_rep (const Array& nda) @@ -645,7 +641,6 @@ } } -DEFINE_OCTAVE_ALLOCATOR(idx_vector::idx_mask_rep); idx_vector::idx_mask_rep::idx_mask_rep (bool b) : data (0), len (b ? 1 : 0), ext (0), lsti (-1), lste (-1), diff -r db92e7e28e1f -r 76478d2da117 liboctave/array/idx-vector.h --- a/liboctave/array/idx-vector.h Tue Jan 20 10:29:54 2015 -0500 +++ b/liboctave/array/idx-vector.h Tue Jan 20 13:43:29 2015 -0500 @@ -34,7 +34,6 @@ #include "dim-vector.h" #include "oct-inttypes.h" -#include "oct-alloc.h" #include "oct-refcount.h" template class Array; @@ -146,7 +145,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR // No copying! idx_colon_rep (const idx_colon_rep& idx); @@ -208,7 +206,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR // No copying! idx_range_rep (const idx_range_rep& idx); @@ -265,7 +262,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR // No copying! idx_scalar_rep (const idx_scalar_rep& idx); @@ -332,7 +328,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR // No copying! idx_vector_rep (const idx_vector_rep& idx); @@ -406,7 +401,6 @@ private: - DECLARE_OCTAVE_ALLOCATOR // No copying! idx_mask_rep (const idx_mask_rep& idx); diff -r db92e7e28e1f -r 76478d2da117 liboctave/util/module.mk --- a/liboctave/util/module.mk Tue Jan 20 10:29:54 2015 -0500 +++ b/liboctave/util/module.mk Tue Jan 20 13:43:29 2015 -0500 @@ -58,7 +58,6 @@ util/lo-array-gripes.cc \ util/lo-ieee.cc \ util/lo-utils.cc \ - util/oct-alloc.cc \ util/oct-base64.cc \ util/oct-glob.cc \ util/oct-inttypes.cc \ diff -r db92e7e28e1f -r 76478d2da117 liboctave/util/oct-alloc.cc --- a/liboctave/util/oct-alloc.cc Tue Jan 20 10:29:54 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* - -Copyright (C) 1996-2013 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -. - -*/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "oct-alloc.h" - -void * -octave_allocator::alloc (size_t size) -{ - if (size != item_size) - return ::new char [size]; - - if (! head) - { - if (! grow ()) - return 0; - } - - link *tmp = head; - head = head->next; - return tmp; -} - -// FIXME: if we free the last item on the list, shouldn't we -// also free the underlying character array used for storage? - -void -octave_allocator::free (void *p, size_t size) -{ - if (size != item_size) - ::delete [] (static_cast (p)); - else - { - link *tmp = static_cast (p); - tmp->next = head; - head = tmp; - } -} - -// Return TRUE for successful allocation, FALSE otherwise. - -bool -octave_allocator::grow (void) -{ - bool retval = true; - - char *start = new char [grow_size * item_size]; - - if (start) - { - char *last = &start[(grow_size - 1) * item_size]; - - char *p = start; - while (p < last) - { - char *next = p + item_size; - (reinterpret_cast (p)) -> next - = reinterpret_cast (next); - p = next; - } - - (reinterpret_cast (last)) -> next = 0; - - head = reinterpret_cast (start); - } - else - { - typedef void (*error_handler_function) (void); - - error_handler_function f = std::set_new_handler (0); - std::set_new_handler (f); - - if (f) - f (); - - retval = false; - } - - return retval; -} diff -r db92e7e28e1f -r 76478d2da117 liboctave/util/oct-alloc.h --- a/liboctave/util/oct-alloc.h Tue Jan 20 10:29:54 2015 -0500 +++ b/liboctave/util/oct-alloc.h Tue Jan 20 13:43:29 2015 -0500 @@ -23,79 +23,10 @@ #if !defined (octave_oct_alloc_h) #define octave_oct_alloc_h 1 -#include - -class -OCTAVE_API -octave_allocator -{ -public: - - octave_allocator (size_t item_sz, int grow_sz = 256) - : head (0), grow_size (grow_sz), - item_size (item_sz > sizeof (link *) ? item_sz : sizeof (link *)) - { } - - // Get an object from the free list, possibly increasing the size of - // the free list. - void *alloc (size_t size); - - // Put objects back on the free list. - void free (void *p, size_t size); - -private: - - // Structure for internal free list management. - struct link { link *next; }; - - // Front of the free list. - link *head; - - // How many objects to get each time we call the global operator new. - int grow_size; - - // The size of each item on the list (or, if that is smaller than - // the size of list*, the size of list*. - size_t item_size; - - // How to grow the free list. - bool grow (void); -}; - -#if defined (HAVE_PLACEMENT_DELETE) -#define DECLARE_OCTAVE_ALLOCATOR_PLACEMENT_DELETE \ - void operator delete (void *p, void *) \ - { ::operator delete (p, static_cast (0)); } -#else -#define DECLARE_OCTAVE_ALLOCATOR_PLACEMENT_DELETE \ - void operator delete (void *p, void *) \ - { ::operator delete (p); } -#endif - -#if defined (USE_OCTAVE_ALLOCATOR) - -#define DECLARE_OCTAVE_ALLOCATOR \ - public: \ - void *operator new (size_t size, void *p) \ - { return ::operator new (size, p); } \ - DECLARE_OCTAVE_ALLOCATOR_PLACEMENT_DELETE \ - void *operator new (size_t size) { return allocator.alloc (size); } \ - void operator delete (void *p, size_t size) { allocator.free (p, size); } \ - private: \ - static octave_allocator allocator; - -#define DEFINE_OCTAVE_ALLOCATOR(t) \ - octave_allocator t::allocator (sizeof (t)) - -#define DEFINE_OCTAVE_ALLOCATOR2(t, s) \ - octave_allocator t::allocator (sizeof (t), s) - -#else +#warning "the octave_allocator class has been deprecated and will be removed in a future release of Octave" #define DECLARE_OCTAVE_ALLOCATOR #define DEFINE_OCTAVE_ALLOCATOR(t) #define DEFINE_OCTAVE_ALLOCATOR2(t, s) #endif - -#endif