Changeset fea494 in git for xalloc/omalloc.h


Ignore:
Timestamp:
Sep 24, 2014, 1:05:36 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b9f50b373314e74e83c7c060a651dd2913e1f033')
Children:
65a40710c408315804772d0a7ff078203be9d9bf
Parents:
46f37cb57098799d8399fc704c5b3ca2020ca0c1
Message:
format
File:
1 edited

Legend:

Unmodified
Added
Removed
  • xalloc/omalloc.h

    r46f37cb rfea494  
    7676static inline void *omRealloc(void *d, size_t ns)
    7777{ if (d==NULL) return omAlloc(ns);
    78   else 
     78  else
    7979  {
    80     long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long)); 
     80    long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long));
    8181    *dd=ns+sizeof(long);dd++; return dd;
    8282  }
     
    8484static inline void *omReallocSize(void *d, size_t os, size_t ns)
    8585{ if (d==NULL) return omAlloc(ns);
    86   else 
     86  else
    8787  {
    88     long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long)); 
     88    long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long));
    8989    *dd=ns+sizeof(long);dd++; return dd;
    9090  }
     
    161161};
    162162// typedef enum omError_e omError_t;
    163    
     163
    164164#define omSizeWOfAddr(P)         (omSizeOfAddr(P)/sizeof(long))
    165    
     165
    166166#define omTypeAllocBin(T,P,B)    P=(T)omAlloc(B)
    167167#define omTypeAlloc(T,P,S)       P=(T)omAlloc(S)
     
    173173#define omAllocBin0(B)           omAlloc0(B)
    174174#define omAlloc0Bin(B)           omAlloc0(B)
    175 #define omInitInfo()             
     175#define omInitInfo()
    176176#define omInitGetBackTrace()
    177 #define omUpdateInfo()             
     177#define omUpdateInfo()
    178178#define omPrintStats(F)
    179179#define omPrintInfo(F)
Note: See TracChangeset for help on using the changeset viewer.