Changeset 5374da in git for Singular/tesths.cc


Ignore:
Timestamp:
Jun 14, 2011, 3:50:42 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
9189e93eec836e1bd1e7b9961d718cb4ecce03c9
Parents:
1b74f33756e72aff51761ea644ac69f9ea6861ff
Message:
libsingular stuff

git-svn-id: file:///usr/local/Singular/svn/trunk@14279 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/tesths.cc

    r1b74f3 r5374da  
    3636#include <Singular/bbfan.h>
    3737#include <Singular/pyobject_setup.h>
     38#include <omalloc/omalloc.h>
    3839
    3940
     
    4647
    4748#if ! defined(LIBSINGULAR)
     49int mmInit( void )
     50{
     51#if defined(OMALLOC_USES_MALLOC) || defined(X_OMALLOC)
     52    /* in mmstd.c, for some architectures freeSize() unconditionally uses the *system* free() */
     53    /* sage ticket 5344: http://trac.sagemath.org/sage_trac/ticket/5344 */
     54    /* do not rely on the default in Singular as libsingular may be different */
     55    mp_set_memory_functions(omMallocFunc,omReallocSizeFunc,omFreeSizeFunc);
     56#else
     57    mp_set_memory_functions(malloc,reallocSize,freeSize);
     58#endif
     59  return 1;
     60}
     61
     62
    4863/*0 implementation*/
    4964int main(          /* main entry to Singular */
     
    5166    char** argv)   /* parameter array */
    5267{
     68  mmInit();
    5369  // Don't worry: ifdef OM_NDEBUG, then all these calls are undef'ed
    5470  omInitRet_2_Info(argv[0]);
Note: See TracChangeset for help on using the changeset viewer.