Changeset 673cd63 for libcfa/src
- Timestamp:
- Apr 26, 2019, 4:59:48 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 5b11c25
- Parents:
- ffe2fad (diff), 1bc5975 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.hfa
rffe2fad r673cd63 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Dec 17 15:37:45 201813 // Update Count : 3 4612 // Last Modified On : Wed Apr 24 17:35:43 2019 13 // Update Count : 352 14 14 // 15 15 … … 40 40 } // malloc 41 41 42 // T & malloc( void ) {43 // int & p = *(T *)(void *)malloc( (size_t)sizeof(T) ); // C malloc44 // printf( "& malloc %p\n", &p );45 // return p;46 // // return (T &)*(T *)(void *)malloc( (size_t)sizeof(T) ); // C malloc47 // } // malloc48 49 42 T * calloc( size_t dim ) { 50 43 return (T *)(void *)calloc( dim, sizeof(T) ); // C calloc … … 76 69 T * alloc( char fill ) { 77 70 T * ptr = (T *)(void *)malloc( (size_t)sizeof(T) ); // C malloc 78 return (T *)memset( ptr, (int)fill, sizeof(T) ); // initialwith fill value71 return (T *)memset( ptr, (int)fill, sizeof(T) ); // initialize with fill value 79 72 } // alloc 80 73 … … 84 77 85 78 T * alloc( size_t dim, char fill ) { 86 T * ptr = (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc87 return (T *)memset( ptr, (int)fill, dim * sizeof(T) ); // initialwith fill value79 T * ptr = (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C calloc 80 return (T *)memset( ptr, (int)fill, dim * sizeof(T) ); // initialize with fill value 88 81 } // alloc 89 82
Note: See TracChangeset
for help on using the changeset viewer.