File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 2020#define OM_MARK_AS_STATIC (addr ) ((void)0)
2121#endif
2222
23+ #if OM_PROVIDE_MALLOC > 0
24+
2325void * calloc (size_t nmemb , size_t size )
2426{
2527 void * addr ;
@@ -32,16 +34,6 @@ void* calloc(size_t nmemb, size_t size)
3234 return addr ;
3335}
3436
35- void * malloc (size_t size )
36- {
37- void * addr ;
38- if (size == 0 ) size = 1 ;
39-
40- omTypeAllocAligned (void * , addr , size );
41- OM_MARK_AS_STATIC (addr );
42- return addr ;
43- }
44-
4537void free (void * addr )
4638{
4739 omfree (addr );
@@ -101,6 +93,18 @@ char* strdup_(const char* addr)
10193 return NULL ;
10294}
10395#endif
96+ #endif
97+
98+ void * 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{
106110 if (addr ) omFreeSize (addr , size );
You can’t perform that action at this time.
0 commit comments