Forum Discussion
Altera_Forum
Honored Contributor
15 years agoSo how do I get an overview of how the memory is used?
This is how I declare my buffer:# define BUFFER_SIZE 750# define SSS_TX_BUF_SIZE 1500
...
volatile INT16U * buffer; // buffer in the DDR2 SDRAM for DMA-Controller to write to
/* Allocate memory for the circular sample buffer*/
if((buffer = alt_uncached_malloc(BUFFER_SIZE * sizeof (INT16U))) == NULL)
{
printf("Can't allocate memory!");
}
...
send(conn.fd, (INT8U*)buffer, SSS_TX_BUF_SIZE, 0); // send buffer content to PC
...
I could also declare it like: INT16U buffer[BUFFER_SIZE]; I think I was having trouble with presice buffering so I just tried the volatile and alt_uncashed_malloc() Is that advisable?