summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cae1c5b)
raw | patch | inline | side by side (parent: cae1c5b)
author | Romain Naour <romain.naour@smile.fr> | |
Tue, 16 May 2023 16:14:35 +0000 (18:14 +0200) | ||
committer | Andrew Davis <afd@ti.com> | |
Wed, 17 May 2023 16:23:48 +0000 (11:23 -0500) |
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>
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>
host_linux/simple_buffer_example/host/App.c | patch | blob | history |
diff --git a/host_linux/simple_buffer_example/host/App.c b/host_linux/simple_buffer_example/host/App.c
index 276411014c287388c7a5669cd316240052ba0704..0753abb441fbda325745f59a33587efe72ab0ef1 100644 (file)
HeapMem_delete(&sr1Heap);
}
if (sharedRegionAllocPtr) {
- /* free the message */
- munmap(sharedRegionAllocPtr, BIGDATA_BUF_SIZE);
+ /* free the shared region */
+ munmap(sharedRegionAllocPtr, BIG_DATA_POOL_SIZE);
}
/* Print error count if non-zero */
if (errorCount) {