Changeset 715936 in git


Ignore:
Timestamp:
Sep 9, 2011, 7:41:13 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
f29ab6c2e7fe07c324d37a46dfb6a9760b4ecb66
Parents:
534886637bbc60712e1adffc56bba8346d98e245
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-09 19:41:13+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:40+01:00
Message:
FIX: omalloc should be configured with with-external-config_h=../Singular/omSingularConfig.h (?)
FIX: moved memory management to Singular/
FIX: mmstd.c should not provide mm/c/v -alloc & free (recursion problem!)
Files:
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • Singular/makefile

    r5348866 r715936  
    145145CXXSOURCES2     = SingularBuilder.cpp
    146146
    147 CSOURCES = fereadl.c
     147CSOURCES = fereadl.c mmstd.c
    148148
    149149SOURCES=${CSOURCES} ${CXXSOURCES} \
     
    181181   minpoly.h \
    182182   misc_ip.h \
     183   mmalloc.h \
     184   omSingularConfig.h \
    183185   mpsr.h \
    184186   mpsr_Get.h \
     
    189191   ndbm.h \
    190192   newstruct.h \
    191    omSingularConfig.h \
    192193   pcv.h \
    193194   pipeLink.h \
  • Singular/misc_ip.cc

    r5348866 r715936  
    676676    v=v->next;
    677677  } while (v!=NULL);
     678   
    678679  // set global variable to show memory usage
    679680  extern int om_sing_opt_show_mem;
    680681  if (BVERBOSE(V_SHOW_MEM)) om_sing_opt_show_mem = 1;
    681682  else om_sing_opt_show_mem = 0;
     683   
    682684  return FALSE;
    683685}
  • Singular/mmstd.c

    r5348866 r715936  
    1111
    1212#include <omalloc/omalloc.h>
    13 #include <Singular/static.h>
     13#include <omalloc/config.h>
     14#include <omalloc/omConfig.h>
     15
     16#include "static.h"
    1417
    1518// we provide these functions, so that the settings of OM_CHECK
     
    1821// already provided in libomalloc
    1922#if !defined(OMALLOC_USES_MALLOC) && !defined(X_OMALLOC)
    20     /* in mmstd.c, for some architectures freeSize() unconditionally uses the *system* free() */
    21     /* sage ticket 5344: http://trac.sagemath.org/sage_trac/ticket/5344 */
    22     /* solution: correctly check OMALLOC_USES_MALLOC from omalloc.h, */
    23     /* do not rely on the default in Singular as libsingular may be different */
     23
     24/* in mmstd.c, for some architectures freeSize() unconditionally uses the *system* free() */
     25/* sage ticket 5344: http://trac.sagemath.org/sage_trac/ticket/5344 */
     26/* solution: correctly check OMALLOC_USES_MALLOC from omalloc.h, */
     27/* do not rely on the default in Singular as libsingular may be different */
    2428
    2529// define this so that all addr allocated there are marked
     
    2731#define OM_MALLOC_MARK_AS_STATIC
    2832#define strdup_ strdup__
    29 #include <omalloc/omalloc.c>
     33#include <omalloc/omalloc.c> /// UGLY!!!!!!!!!!!!!!!!
     34
    3035#else
    3136#include <stdlib.h>
  • Singular/mpsr_GetMisc.cc

    r5348866 r715936  
    436436#undef freeSize
    437437
    438 #include "kernel/mmalloc.h"
     438#include "mmalloc.h"
    439439
    440440static int mpsr_is_initialized = 0;
  • Singular/test.cc

    r5348866 r715936  
    9898#include <kernel/ratgring.h>
    9999#include <kernel/shiftgb.h>
    100 #include <kernel/mmalloc.h>
     100#include "mmalloc.h"
    101101#include <kernel/gfan.h>
    102102
     
    146146
    147147// #include "lplist.h" // Too old!
    148 #include <kernel/mmalloc.h>
     148#include "mmalloc.h"
    149149#include <kernel/multicnt.h>
    150150#include <kernel/npolygon.h>
  • configure.ac

    r5348866 r715936  
    11AC_INIT([singular], [3.1.2.sw])
     2
    23AC_CONFIG_AUX_DIR([.])
     4
    35AM_MAINTAINER_MODE
    46AM_INIT_AUTOMAKE
     
    1315LB_CHECK_NTL(5.0,,AC_MSG_WARN([Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)]))
    1416
    15 AC_CONFIG_FILES([Makefile])
     17
     18#if test x$ac_configure_args != x; then
     19#  old_ac_configure_args="$ac_configure_args"
     20#  ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
     21#else
     22#  old_ac_configure_args=""
     23#fi
     24
     25ac_configure_args="$ac_configure_args --with-external-config_h=../Singular/omSingularConfig.h"
     26
    1627AC_CONFIG_SUBDIRS(omalloc)
     28
     29# ac_configure_args="$old_ac_configure_args"
     30
    1731if test x$ENABLE_FACTORY = xyes; then
    1832  AC_CONFIG_SUBDIRS(factory)
    1933fi
     34
    2035AC_CONFIG_SUBDIRS(libpolys)
     36
     37AC_CONFIG_FILES([Makefile])
    2138AC_CONFIG_FILES([numeric/Makefile])
    2239
  • kernel/makefile

    r5348866 r715936  
    9090
    9191# normal C source files
    92 CSOURCES=fegetopt.c mmstd.c
     92CSOURCES = fegetopt.c
    9393
    9494# special C++ source files (need extra compiling and/or linking), for which
     
    114114        fegetopt.h \
    115115        ratgring.h shiftgb.h nc.h \
    116         mmalloc.h \
    117116        semic.h \
    118117        gfan.h preimage.h
  • kernel/test.cc

    r5348866 r715936  
    9595#include "ratgring.h"
    9696#include "shiftgb.h"
    97 #include "mmalloc.h"
     97// #include "mmalloc.h" // move to Singular!?
    9898#include "gfan.h"
    9999
     
    143143
    144144// #include "lplist.h" // Too old!
    145 #include "mmalloc.h"
    146145#include "multicnt.h"
    147146#include "npolygon.h"
  • omalloc/configure.ac

    r5348866 r715936  
    574574
    575575
     576AC_DEFINE(OM_PROVIDE_MALLOC,0,[Provide NO standard routines!])
     577
     578
    576579
    577580dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
  • omalloc/omConfig.h.in

    r5348866 r715936  
    9696#endif
    9797
     98/* Provide NO standard routines! */
     99#ifndef OM_PROVIDE_MALLOC
     100#undef OM_PROVIDE_MALLOC
     101#endif
     102
    98103/* "Disable debug" */
    99104#ifndef OM_NDEBUG
Note: See TracChangeset for help on using the changeset viewer.