Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/heap.cfa

    r61248a4 r76e2113  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Apr 18 17:43:15 2020
    13 // Update Count     : 718
     12// Last Modified On : Sat Apr 18 08:17:53 2020
     13// Update Count     : 716
    1414//
    1515
     
    844844
    845845extern "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().
    848848        void * malloc( size_t size ) {
    849849                #ifdef __STATISTICS__
     
    856856
    857857
    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().
    859861        void * aalloc( size_t dim, size_t elemSize ) {
    860862                #ifdef __STATISTICS__
     
    877879
    878880
    879         // Same as aalloc() with memory set to zero.
     881        // Same as aalloc() with memory is set to zero.
    880882        void * calloc( size_t dim, size_t elemSize ) {
    881883                #ifdef __STATISTICS__
     
    887889        } // calloc
    888890
    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
    893896        void * resize( void * oaddr, size_t size ) {
    894897                #ifdef __STATISTICS__
     
    920923
    921924
    922         // Same as resize() but the contents are unchanged in the range from the start of the region up to the minimum of
     925        // Same as resize but the contents shall be unchanged in the range from the start of the region up to the minimum of
    923926        // the old and new sizes.
    924927        void * realloc( void * oaddr, size_t size ) {
     
    970973        } // realloc
    971974
    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)
    973977        void * memalign( size_t alignment, size_t size ) {
    974978                #ifdef __STATISTICS__
Note: See TracChangeset for help on using the changeset viewer.