Changeset 95800 in vbox
- Timestamp:
- Jul 25, 2022 12:25:45 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152522
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nocrt/stdlib.h
r93115 r95800 31 31 32 32 #include <iprt/types.h> 33 #include <iprt/mem.h> 33 34 34 35 RT_C_DECLS_BEGIN 35 36 37 #ifdef IPRT_NO_CRT_FOR_3RD_PARTY 38 39 DECLINLINE(void *) RT_NOCRT(malloc)(size_t cb) 40 { 41 return RTMemAlloc(cb); 42 } 43 44 DECLINLINE(void *) RT_NOCRT(calloc)(size_t cItems, size_t cbItem) 45 { 46 return RTMemAllocZ(cItems * cbItem); /* caller responsible for overflow issues. */ 47 } 48 49 DECLINLINE(void *) RT_NOCRT(realloc)(void *pvOld, size_t cbNew) 50 { 51 return RTMemRealloc(pvOld, cbNew); 52 } 53 54 DECLINLINE(void) RT_NOCRT(free)(void *pv) 55 { 56 RTMemFree(pv); 57 } 58 59 # if !defined(RT_WITHOUT_NOCRT_WRAPPERS) && !defined(RT_WITHOUT_NOCRT_WRAPPER_ALIASES) 60 # define malloc RT_NOCRT(malloc) 61 # define calloc RT_NOCRT(calloc) 62 # define realloc RT_NOCRT(realloc) 63 # define free RT_NOCRT(free) 64 # endif 65 66 #endif /* IPRT_NO_CRT_FOR_3RD_PARTY */ 36 67 37 68 RT_C_DECLS_END
Note:
See TracChangeset
for help on using the changeset viewer.