Changeset 896f083
- Timestamp:
- Jul 20, 2020, 3:49:22 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- ffa48a8
- Parents:
- e93cbfa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.hfa
re93cbfa r896f083 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jul 19 18:29:34202013 // Update Count : 46 312 // Last Modified On : Mon Jul 20 14:29:21 2020 13 // Update Count : 464 14 14 // 15 15 … … 60 60 if ( unlikely( size == 0 ) || unlikely( ptr == 0p ) ) { // special cases 61 61 if ( unlikely( size == 0 ) ) free( ptr ); 62 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( (size_t)sizeof(T)); // C malloc63 else return (T *)memalign( _Alignof(T), size of(T) );62 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( size ); // C malloc 63 else return (T *)memalign( _Alignof(T), size ); // C memalign 64 64 } // if 65 65 return (T *)(void *)resize( (void *)ptr, size ); // CFA resize … … 69 69 if ( unlikely( size == 0 ) || unlikely( ptr == 0p ) ) { // special cases 70 70 if ( unlikely( size == 0 ) ) free( ptr ); 71 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( (size_t)sizeof(T)); // C malloc72 else return (T *)memalign( _Alignof(T), size of(T) );71 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( size ); // C malloc 72 else return (T *)memalign( _Alignof(T), size ); // C memalign 73 73 } // if 74 74 return (T *)(void *)realloc( (void *)ptr, size ); // C realloc
Note: See TracChangeset
for help on using the changeset viewer.