File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 28
28
29
29
#include <nuttx/arch.h>
30
30
#include <nuttx/cache.h>
31
+ #include <nuttx/nuttx.h>
31
32
#include <nuttx/kmalloc.h>
32
33
#include <nuttx/pgalloc.h>
33
34
@@ -54,7 +55,8 @@ FAR struct shmfs_object_s *shmfs_alloc_object(size_t length)
54
55
size_t cachesize = up_get_dcache_linesize ();
55
56
if (cachesize > 0 )
56
57
{
57
- object -> paddr = fs_heap_memalign (cachesize , length );
58
+ object -> paddr = fs_heap_memalign (cachesize ,
59
+ ALIGN_UP (length , cachesize ));
58
60
}
59
61
else
60
62
{
@@ -78,7 +80,8 @@ FAR struct shmfs_object_s *shmfs_alloc_object(size_t length)
78
80
size_t cachesize = up_get_dcache_linesize ();
79
81
if (cachesize > 0 )
80
82
{
81
- object -> paddr = kumm_memalign (cachesize , length );
83
+ object -> paddr = kumm_memalign (cachesize ,
84
+ ALIGN_UP (length , cachesize ));
82
85
}
83
86
else
84
87
{
You can’t perform that action at this time.
0 commit comments