Changeset 5560978 in git


Ignore:
Timestamp:
Mar 22, 2018, 2:44:20 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7ce322b8f6be293aef66aa32857f21916e1750e8
Parents:
caf8c65d1b9e21816d4d531841968cbefef2fecb
Message:
opt: memory managent in scanner.cc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/scanner.cc

    rcaf8c6 r5560978  
    585585extern int inerror;
    586586
     587#ifndef SING_NDEBUG
    587588// this is to  shadow the malloc/realloc
    588589// used by yy_flex_malloc/yy_flex_realloc
     
    600601  omMarkAsStaticAddr(new_addr);
    601602  return new_addr;
    602 }
    603 static void my_free(void* addr)
    604 {
    605   omFree(addr);
    606603}
    607604#undef malloc
     
    609606#undef realloc
    610607#define realloc my_realloc
     608#else
     609#undef malloc
     610#define malloc omAlloc
     611#undef realloc
     612#define realloc omRealloc
     613#endif
    611614#undef free
    612 #define free my_free
     615#define free omFree
    613616static char * dupyytext()
    614617{
  • Singular/scanner.ll

    rcaf8c6 r5560978  
    2626extern int inerror;
    2727
     28#ifndef SING_NDEBUG
    2829// this is to  shadow the malloc/realloc
    2930// used by yy_flex_malloc/yy_flex_realloc
     
    4243  return new_addr;
    4344}
    44 static void my_free(void* addr)
    45 {
    46   omFree(addr);
    47 }
    4845#undef malloc
    4946#define malloc my_malloc
    5047#undef realloc
    5148#define realloc my_realloc
     49#else
     50#undef malloc
     51#define malloc omAlloc
     52#undef realloc
     53#define realloc omRealloc
     54#endif
    5255#undef free
    53 #define free my_free
     56#define free omFree
    5457static char * dupyytext()
    5558{
Note: See TracChangeset for help on using the changeset viewer.