Changes in libcfa/src/heap.cfa [61248a4:76e2113]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/heap.cfa
r61248a4 r76e2113 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Apr 18 17:43:15202013 // Update Count : 71 812 // Last Modified On : Sat Apr 18 08:17:53 2020 13 // Update Count : 716 14 14 // 15 15 … … 844 844 845 845 extern "C" { 846 // Allocates size bytes and returns a pointer to the allocated memory. The contents are undefined. If size is 0,847 // then malloc() returns a unique pointer value that can later be successfully passed to free().846 // Allocates size bytes and returns a pointer to the allocated memory. The memory is not initialized. If size is 0, 847 // then malloc() returns either 0p, or a unique pointer value that can later be successfully passed to free(). 848 848 void * malloc( size_t size ) { 849 849 #ifdef __STATISTICS__ … … 856 856 857 857 858 // Same as malloc() except size bytes is an array of dim elements each of elemSize bytes. 858 // Allocate memory for an array of dim elements of size bytes each and returns a pointer to the allocated memory. If 859 // dim or size is 0, then calloc() returns either 0p, or a unique pointer value that can later be successfully 860 // passed to free(). 859 861 void * aalloc( size_t dim, size_t elemSize ) { 860 862 #ifdef __STATISTICS__ … … 877 879 878 880 879 // Same as aalloc() with memory set to zero.881 // Same as aalloc() with memory is set to zero. 880 882 void * calloc( size_t dim, size_t elemSize ) { 881 883 #ifdef __STATISTICS__ … … 887 889 } // calloc 888 890 889 // Change the size of the memory block pointed to by oaddr to size bytes. The contents are undefined. If oaddr is 890 // 0p, then the call is equivalent to malloc(size), for all values of size; if size is equal to zero, and oaddr is 891 // not 0p, then the call is equivalent to free(oaddr). Unless oaddr is 0p, it must have been returned by an earlier 892 // call to malloc(), alloc(), calloc() or realloc(). If the area pointed to was moved, a free(oaddr) is done. 891 // Change the size of the memory block pointed to by ptr to size bytes. The contents are undefined. If ptr is 0p, 892 // then the call is equivalent to malloc(size), for all values of size; if size is equal to zero, and ptr is not 0p, 893 // then the call is equivalent to free(ptr). Unless ptr is 0p, it must have been returned by an earlier call to 894 // malloc(), calloc() or realloc(). If the area pointed to was moved, a free(ptr) is done. 895 893 896 void * resize( void * oaddr, size_t size ) { 894 897 #ifdef __STATISTICS__ … … 920 923 921 924 922 // Same as resize () but the contents are unchanged in the range from the start of the region up to the minimum of925 // Same as resize but the contents shall be unchanged in the range from the start of the region up to the minimum of 923 926 // the old and new sizes. 924 927 void * realloc( void * oaddr, size_t size ) { … … 970 973 } // realloc 971 974 972 // Same as malloc() except the memory address is a multiple of alignment, which must be a power of two. (obsolete) 975 // Allocates size bytes and returns a pointer to the allocated memory. The memory address shall be a multiple of 976 // alignment, which must be a power of two. (obsolete) 973 977 void * memalign( size_t alignment, size_t size ) { 974 978 #ifdef __STATISTICS__
Note: See TracChangeset
for help on using the changeset viewer.