CV-Bowen opened a new pull request, #8353:
URL: https://github.com/apache/nuttx/pull/8353

   ## Summary
   This PR reduces the memory node overhead size to half of the original by 
move the `node->preceding` to previous free node in physical like TLSF does 
(http://www.gii.upv.es/tlsf/main/docs).
   
   Original memory layout of Allocnode and Freenode:
   
![image](https://user-images.githubusercontent.com/39286361/215438882-1825529a-3fdf-4fc0-8cc2-58dfd0e99234.png)
   
   This PR contains two commits:
   Commit 1: Exchange `node->size` and `node->preceding` position and move the 
MM_ALLOC_BIT to `node->size`, this commit is a preparation for move the 
`node->preceding` to previous free node in physical address. 
   After Commit 1, the memory layout of allocnode and freenode become:
   
![image](https://user-images.githubusercontent.com/39286361/215438963-35176f4b-5726-47d7-8f86-f36eeb924052.png)
   
   Commit 2: Add MM_PREVFREE_BIT in `node->size` and move the `node->preceding` 
to previous free node in physical. 
   After Commit 2, the memory layout of allocnode and freenode become:
   
![image](https://user-images.githubusercontent.com/39286361/215439734-f366b1f9-7166-4249-9384-c5c563c50205.png)
   
   ## Impact
   Dynamic Memory Managerment
   
   ## Testing
   Vela and sim mmtest
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to