My Project
Loading...
Searching...
No Matches
Functions
mmalloc.h File Reference

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

◆ freeSize()

void freeSize ( void *  addr,
size_t  size 
)

Definition at line 95 of file omalloc.c.

96{
97 if (addr) omFreeSize(addr, size);
98}
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260

◆ reallocSize()

void * reallocSize ( void *  old_addr,
size_t  old_size,
size_t  new_size 
)

Definition at line 100 of file omalloc.c.

101{
102 if (old_addr && new_size)
103 {
104 void* new_addr;
105 omTypeReallocAlignedSize(old_addr, old_size, void*, new_addr, new_size);
106 OM_MARK_AS_STATIC(new_addr);
107 return new_addr;
108 }
109 else
110 {
111 freeSize(old_addr, old_size);
112 return malloc(new_size);
113 }
114}
#define omTypeReallocAlignedSize
Definition: omAllocDecl.h:276
#define freeSize
Definition: omAllocFunc.c:15
#define malloc
Definition: omAllocFunc.c:12
#define OM_MARK_AS_STATIC(addr)
Definition: omalloc.c:20