Changes between Version 2 and Version 3 of library_malloc


Ignore:
Timestamp:
Aug 4, 2014, 5:30:24 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_malloc

    v2 v3  
    1010The distributed heap(x,y) segments must be explicitely defined in the application mapping.
    1111
    12  * For the '''malloc()''' function, the cluster selection is implicit: the (x,y) coordinate are defined by the coordinates of the processor running the calling task.
    13  * For the '''remote_malloc()''' function, the cluster selection is explicit: the (x,y) coordinates are arguments defined by the calling task
     12The malloc() and free() functions below have the same semantic as the standard UNIX functions.
     13
     14== cluster selection ==
     15
     16Using the '''(x,y)''' arguments (as in the remote_malloc() function below), the user application can explicitely select the allocator in cluster(x,y).
     17If 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.
     18If 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.
     19
     20 == alignment ==
     21
     22Using the '''align''' arguments, the user application can require the  selected allocator to return a virtual address aligned on a power of 2 (1 << align).
     23If the align argument value is larger than 31, a NULL pointer is returned.
    1424
    1525 == Available functions
    1626
    17  *
     27 * '''void * malloc( unsigned int size )
     28 * '''void * malloc_aligned( unsigned int size, unsigned int align )
     29 * '''void * remote_malloc( unsigned int size, unsigned int x, unsigned int y )
     30 * '''void * remote_malloc_aligned( unsigned int size, unsigned int align, unsigned int x, unsigned int y )
     31 * '''void free( void* ptr )
     32 
     33 == WARNING ==
     34In the present implementation, the free() function cannot be used with the remote_malloc() and remote