Reproduced in: http://blog.csdn.net/syc0616/article/details/3734941
The DMA bus error on the cell is mostly due to the transfer memory start address that is not 16-bit aligned. Using Memalign, Valloc, (see below), malloc_aligned, the function is cell proprietary, contained in Libmisc.h. The following is transferred from Http://ms.mblogger.cn/lymons/posts/9902.aspx.
In the GNU system, the memory block address returned by malloc or realloc is a multiple of 8 (if it is a 64-bit system, it is a multiple of 16). If you need a larger granularity, use either Memalign or Valloc. These functions are declared in the header file "Stdlib.h".
In the GNU library, you can use the function free to release the memory blocks returned by Memalign and Valloc. It is not available in BSD systems, and the BSD system does not provide a way to free such chunks of memory.
function: void * memalign (size_t boundary, size_t size)
The function Memalign allocates a block of memory with a size specified by size, and an address that is a multiple of the boundary. Parameter boundary must be a power of 2. Function memalign can allocate large blocks of memory and can specify granularity for the returned address.
function: void * VALLOC (size_t size)
Using function Valloc is similar to using function memalign, in the inner implementation of function Valloc, the page size is used as the alignment length and the memalign is used to allocate memory. Its implementation is shown below:
void *
Valloc (size_t size)
{
Return Memalign (GetPageSize (), size);
}
-------------------------------
In the recording of two good cell topic pages:
1.mit cell feature page: http://cag.csail.mit.edu/ps3/cellminiref.shtml
2.IBM Special topic: http://www.ibm.com/developerworks/cn/linux/pa-linuxps3-3/index.html