mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
mm/mm_gran: fix data truncation by using size_t for mask
Use size_t instead of unsigned int for 'mask' to avoid address truncation, especially when memory addresses exceed 32 bits. Signed-off-by: liang.huang <liang.huang@houmo.ai>
This commit is contained in:
parent
e8b3630224
commit
64d191d32e
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ GRAN_HANDLE gran_initialize(FAR void *heapstart, size_t heapsize,
|
|||
FAR struct gran_s *priv;
|
||||
uintptr_t heapend;
|
||||
uintptr_t alignedstart;
|
||||
unsigned int mask;
|
||||
size_t mask;
|
||||
unsigned int alignedsize;
|
||||
unsigned int ngranules;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue