aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Naour2023-05-16 11:14:35 -0500
committerAndrew Davis2023-05-17 11:23:48 -0500
commit54ef4a6657712517c55411cac88c4d6c3bd7eba9 (patch)
tree8c5781595e94570dea5983667a60f95fe2bb4467
parentcae1c5be8e229563ab41845dc5a280e5292e8440 (diff)
downloadbig-data-ipc-examples-master.tar.gz
big-data-ipc-examples-master.tar.xz
big-data-ipc-examples-master.zip
host_linux: dsp: fix munmap lengthHEADmaster
While switching the demo application memory allocation from CMEM to DMA-BUF HEAPS the wrong define was used for munmap length. Indeed, the two define may be confused but it is not the same amount of memory: BIGDATA_BUF_SIZE is 16384 BIG_DATA_POOL_SIZE is 0x1000000. BIG_DATA_POOL_SIZE should have been used since it was used previously by mmap(). Fixes 3dedbde2a539834ee8f4d0419888116ea80789d0 While at it, update the comment that seems to be duplicated from MessageQ_free() comment above. Signed-off-by: Romain Naour <romain.naour@smile.fr>
-rw-r--r--host_linux/simple_buffer_example/host/App.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/host_linux/simple_buffer_example/host/App.c b/host_linux/simple_buffer_example/host/App.c
index 2764110..0753abb 100644
--- a/host_linux/simple_buffer_example/host/App.c
+++ b/host_linux/simple_buffer_example/host/App.c
@@ -519,8 +519,8 @@ leave:
519 HeapMem_delete(&sr1Heap); 519 HeapMem_delete(&sr1Heap);
520 } 520 }
521 if (sharedRegionAllocPtr) { 521 if (sharedRegionAllocPtr) {
522 /* free the message */ 522 /* free the shared region */
523 munmap(sharedRegionAllocPtr, BIGDATA_BUF_SIZE); 523 munmap(sharedRegionAllocPtr, BIG_DATA_POOL_SIZE);
524 } 524 }
525 /* Print error count if non-zero */ 525 /* Print error count if non-zero */
526 if (errorCount) { 526 if (errorCount) {