Changeset b4c464c in git


Ignore:
Timestamp:
Nov 26, 2012, 2:09:09 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
Children:
e12d106a70736a96de005699524e86b37b9e9c98
Parents:
c8101dfa6b8a68e78189a8722b9816e986c97857
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-11-26 14:09:09+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-11-26 14:09:52+01:00
Message:
fix: tr. #463 (from master)
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/hutil.cc

    rc8101d rb4c464c  
    10251025  if ((x==NULL) || (lm > lx))
    10261026  {
    1027     if ((x!=NULL)&&(lx>0)) omFreeSize((ADDRESS)x, lx * sizeof(scmon));
     1027    /* according to http://www.singular.uni-kl.de:8002/trac/ticket/463#comment:4
     1028     * we need to work around a compiler bug:
     1029    * if ((x!=NULL)&&(lx>0)) omFreeSize((ADDRESS)x, lx * sizeof(scmon));
     1030    */
     1031    if (x!=NULL) if (lx>0) omFreeSize((ADDRESS)x, lx * sizeof(scmon));
    10281032    monmem->mo = x = (scfmon)omAlloc(lm * sizeof(scmon));
    10291033    monmem->a = lm;
  • libpolys/polys/nc/old.gring.cc

    rc8101d rb4c464c  
    4848
    4949#include <polys/operations/p_Mult_q.h>
    50 // dirty tricks:
    51 #include <polys/templates/p_MemAdd.h>
    5250
    5351// #include <polys/pInline1.h>
     
    465463  int iF,jG,iG;
    466464  int rN=r->N;
    467   int ExpSize=(((rN+1)*sizeof(int)+sizeof(long)-1)/sizeof(long))*sizeof(long);
    468465
    469466  int *F=(int *)omAlloc0((rN+1)*sizeof(int));
     
    474471  memcpy(G, G0,(rN+1)*sizeof(int));
    475472  //  pExpVectorCopy(G,G0);
    476   F[0]=0; /* important for p_MemAdd */
     473  F[0]=0;
    477474  G[0]=0;
    478475
     
    498495    /* i.e. no mixed exp_num , MERGE case */
    499496  {
    500     p_MemAdd_LengthGeneral(F, G, ExpSize/sizeof(long));
     497    { for(int ii=rN;ii>0;ii--) F[ii]+=G[ii]; }
    501498    p_SetExpV(out,F,r);
    502499    p_Setm(out,r);
    503     //    omFreeSize((ADDRESS)F,ExpSize);
    504500    freeT(F,rN);
    505501    freeT(G,rN);
     
    560556      cff=totcff;
    561557    }
    562     p_MemAdd_LengthGeneral(F, G, ExpSize/sizeof(long));
     558    { for(int ii=rN;ii>0;ii--) F[ii]+=G[ii]; }
    563559    p_SetExpV(out,F,r);
    564560    p_Setm(out,r);
    565561    p_SetCoeff(out,cff,r);
    566     //    p_MemAdd_NegWeightAdjust(p, r); ??? do we need this?
    567562    freeT(F,rN);
    568563    freeT(G,rN);
Note: See TracChangeset for help on using the changeset viewer.