comparison source/main.c @ 1:5ba54fc65608

Revert a stupid s/memalign/calloc/ in soc:U initialisation.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 22 Feb 2015 18:20:59 +0100
parents 4e831ec746e4
children 4c4be527a8d5
comparison
equal deleted inserted replaced
0:4e831ec746e4 1:5ba54fc65608
90 struct network_t *networkInit(const char *hostname, int port) 90 struct network_t *networkInit(const char *hostname, int port)
91 { 91 {
92 const unsigned SOC_ALIGN = 0x1000; 92 const unsigned SOC_ALIGN = 0x1000;
93 const unsigned SOC_BUFFERSIZE = 0x100000; 93 const unsigned SOC_BUFFERSIZE = 0x100000;
94 94
95 SOC_buffer = (u32*)calloc(SOC_ALIGN, SOC_BUFFERSIZE); 95 SOC_buffer = (u32*)memalign(SOC_ALIGN, SOC_BUFFERSIZE);
96 if (!SOC_buffer) { 96 if (!SOC_buffer) {
97 printf("calloc() failed.\n"); 97 printf("calloc() failed.\n");
98 return NULL; 98 return NULL;
99 } 99 }
100 100