Changeset cadaf2 in git for omalloc/omalloc.c


Ignore:
Timestamp:
Nov 27, 2012, 2:27:19 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
2abbc7658912b7ff427a0603e95ab63e9a736311
Parents:
6fcddc9d1ce61bb4b060ffc6ead86cd70694c9a8
Message:
fix: optional omalloc parts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • omalloc/omalloc.c

    r6fcddc9 rcadaf2  
    2121#endif
    2222
     23#if OM_PROVIDE_MALLOC > 0
     24
    2325void* calloc(size_t nmemb, size_t size)
    2426{
     
    2931  size = size*nmemb;
    3032  omTypeAlloc0Aligned(void*, addr, size);
    31   OM_MARK_AS_STATIC(addr);
    32   return addr;
    33 }
    34 
    35 void* malloc(size_t size)
    36 {
    37   void* addr;
    38   if (size == 0) size = 1;
    39 
    40   omTypeAllocAligned(void*, addr, size);
    4133  OM_MARK_AS_STATIC(addr);
    4234  return addr;
     
    10294}
    10395#endif
     96#endif
     97
     98void* malloc(size_t size)
     99{
     100  void* addr;
     101  if (size == 0) size = 1;
     102
     103  omTypeAllocAligned(void*, addr, size);
     104  OM_MARK_AS_STATIC(addr);
     105  return addr;
     106}
     107
    104108void freeSize(void* addr, size_t size)
    105109{
Note: See TracChangeset for help on using the changeset viewer.