Functions
mmalloc.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Functions

void * reallocSize (void *old_addr, size_t old_size, size_t new_size)
 
void freeSize (void *addr, size_t size)
 

Function Documentation

void freeSize ( void *  addr,
size_t  size 
)

Definition at line 108 of file omalloc.c.

109 {
110  if (addr) omFreeSize(addr, size);
111 }
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
void* reallocSize ( void *  old_addr,
size_t  old_size,
size_t  new_size 
)

Definition at line 113 of file omalloc.c.

114 {
115  if (old_addr && new_size)
116  {
117  void* new_addr;
118  omTypeReallocAlignedSize(old_addr, old_size, void*, new_addr, new_size);
119  OM_MARK_AS_STATIC(new_addr);
120  return new_addr;
121  }
122  else
123  {
124  freeSize(old_addr, old_size);
125  return malloc(new_size);
126  }
127 }
#define omTypeReallocAlignedSize
Definition: omAllocDecl.h:276
void * malloc(size_t size)
Definition: omalloc.c:98
void freeSize(void *addr, size_t size)
Definition: omalloc.c:108
#define OM_MARK_AS_STATIC(addr)
Definition: omalloc.c:20