Ignore:
Timestamp:
Aug 7, 2014, 12:23:12 PM (10 years ago)
Author:
alain
Message:

Major evolution of the malloc library, to provide two new services:

  • all allocated blocks are aligned, and the size is a power of 2.
  • the remote-malloc() function allows the application to explicitely define the cluster(x,y).

We keep only the close-fit allocation policy.
These services were required to implement the distributed SBT barrier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/stdlib.c

    r352 r382  
    99
    1010///////////////////////////////////////////////////////////////////////////////////
    11 // int atoi ( char * str )
     11int atoi(char *str)
    1212///////////////////////////////////////////////////////////////////////////////////
    13        
    14 int atoi(char *str)
    1513{
    1614    int res  = 0; // Initialize result
     
    3432       
    3533////////////////////////////////////////////////////////////////////////////////////////
    36 //  mempcy()
    37 // GCC requires this function. Taken from MutekH.
     34void * memcpy(void *_dst, const void * _src, unsigned int size)
    3835////////////////////////////////////////////////////////////////////////////////////////
    39 void * memcpy(void *_dst, const void * _src, unsigned int size)
    4036{
    4137    unsigned int * dst = _dst;
     
    6056}
    6157
    62 
    6358////////////////////////////////////////////////////////////////////////////////////////
    64 //  memset()
    65 // GCC requires this function. Taken from MutekH.
     59inline void * memset(void * dst, int s, unsigned int size)
    6660////////////////////////////////////////////////////////////////////////////////////////
    67 inline void * memset(void * dst, int s, unsigned int count)
    6861{
    6962    char * a = (char *) dst;
    70     while (count--)
     63    while (size--)
    7164    {
    7265        *a++ = (char)s;
Note: See TracChangeset for help on using the changeset viewer.