Hi,
I have a large images that I want to send with NDK 2.24 from my c6678 to the PC. Monumentally I do it like this:
CACHE_setL2Size(CACHE_256KCACHE);
while ((total_numberOfBytes > 0) ) {
IF (total_numberOfBytes < ETHERNET_BUFFER_LENGTH) {
numberOfBytes_to_send = total_numberOfBytes;
}
sendto (s, localAddress, numberOfBytes_to_send, 0,(struct sockaddr *)&sin1, sizeof(sin1) );
localAddress += ETHERNET_BUFFER_LENGTH;
total_numberOfBytes -= ETHERNET_BUFFER_LENGTH;
}
but with this code I get only 250 MB/s that is not enough for my application.
Is it right that NDK allocates the memory for heap each time I use sendto()? If it is so, so how can I use the same heap without to reallocate it each time?