fix alignment bug
This commit is contained in:
parent
3e1a0bc7d6
commit
4d8872bcfa
1 changed files with 4 additions and 4 deletions
|
@ -91,7 +91,7 @@
|
|||
*/
|
||||
|
||||
#if MMNIF_USE_MPB
|
||||
#define MMNIF_RX_BUFFERLEN (2*1024)
|
||||
#define MMNIF_RX_BUFFERLEN (7*1024)
|
||||
#else
|
||||
#define MMNIF_RX_BUFFERLEN (8*1024)
|
||||
#endif
|
||||
|
@ -999,9 +999,6 @@ err_t mmnif_init(struct netif *netif)
|
|||
*/
|
||||
heap_size = MMNIF_RX_BUFFERLEN;
|
||||
|
||||
// align mpb size to the granularity of a page size
|
||||
heap_size = (heap_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
|
||||
|
||||
#if MMNIF_USE_MPB
|
||||
heap_start_address = RCCE_malloc(RCCE_LINE_SIZE);
|
||||
DEBUGPRINTF("MessagePassingBuffer allocated @ : %p\n", heap_start_address);
|
||||
|
@ -1015,6 +1012,9 @@ err_t mmnif_init(struct netif *netif)
|
|||
}
|
||||
|
||||
#else
|
||||
// align size to the granularity of a page size
|
||||
heap_size = (heap_size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
|
||||
|
||||
heap_start_address = (void*) RCCE_shmalloc(heap_size * MMNIF_CORES);
|
||||
DEBUGPRINTF("RCCE_shmalloc : %p (size %u)\n", header_start_address, MMNIF_CORES * header_size);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue