Changes between Version 5 and Version 6 of library_malloc


Ignore:
Timestamp:
Aug 6, 2014, 2:30:42 PM (11 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_malloc

    v5 v6  
    99
    1010The distributed heap(x,y) segments must be explicitely defined in the application mapping.
     11WARNING: The heap(x,y) segment size must be a power of 2, and the heap(x,y)  base address must be aligned.
     12
     13 == Allocation policy ==
     14
     15The block size requested by the user application can have any value, but the allocated block size can be larger than the requested size:
     16As the memory allocator handles only aligned blocks whose size is a power of 2, the actual block size is the smallest power of 2 value larger or equal to the requested size.
     17With this allocation policy, all allocated block are aligned (base address multiple of the size).
     18
     19 == cluster selection ==
    1120
    1221The malloc() and free() functions below have the same semantic as the standard UNIX functions.
    13 The remote_malloc() and malloc_aligned() functions are GIET-VM extensions.
     22The remote_malloc() function is a specific GIET-VM extension.
    1423
    15 == cluster selection ==
    16 
    17 Using the '''(x,y)''' arguments (as in the remote_malloc() function below), the user application can explicitely select the allocator in cluster(x,y).
    18 If these arguments (x,y) are not defined, (as in the malloc() function below), the cluster is implicitely defined by the (x,y) coordinate of the processor running the calling task.
     24Using the (x,y) arguments in the remote_malloc() function, the user application can explicitely select the cluster(x,y) where memory will be allocated.
     25If these arguments (x,y) are not defined, as in the malloc() function, the cluster is implicitely defined by the (x,y) coordinate of the processor running the calling task.
    1926If there is no heap(x,y) defined in the selected cluster, or if there is no more space in the selected heap(x,y) segment, a NULL pointer is returned.
    20 
    21  == alignment ==
    22 
    23 Using the '''align''' arguments, the user application can require the  selected allocator to return a virtual address aligned on a power of 2 (1 << align).
    24 If the align argument value is larger than 31, a NULL pointer is returned.
    2527
    2628 == Available functions
    2729
    2830 * '''void * malloc( unsigned int size )
    29  * '''void * malloc_aligned( unsigned int size, unsigned int align )
    3031 * '''void * remote_malloc( unsigned int size, unsigned int x, unsigned int y )
    31  * '''void * remote_malloc_aligned( unsigned int size, unsigned int align, unsigned int x, unsigned int y )
    3232 * '''void free( void* ptr )
    3333