-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INTERNAL: Refactor the structure of additional item in mblck #756
base: develop
Are you sure you want to change the base?
Conversation
779a775
to
0e59fb1
Compare
ν΄λΉ PRλ 리뷰 λΆνλ립λλ€. |
mblck_node_t *head; | ||
mblck_node_t *tail; | ||
value_item **addnl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
head
μnext
λ₯Ό ν΅ν΄ μ 체 itemμ μ κ·Ό κ°λ₯ν κ²μΈλ°,addnl
μ λλ μ΄μ λ 무μμΈκ°μ?value_item
arrayλ₯Ό λλ€λ©΄, tail λ± λ§ν¬λ리μ€νΈ κ΄λ ¨ fieldλ₯Ό μ κ±°ν μ μλ κ²μ΄ μλμ§?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addnl
μ ritem read μ νμ©νκΈ° μνμ¬ μΆκ°ν κ² (HINFO, EINFOμ μ μ¬ν ꡬ쑰λ₯Ό κ°λλ‘)- mblckμ ritem read μΈμλ νμ©νλ κ²½μ°κ° μλλ° (
tokenize_XXX()
), μ΄ λ list λ°©μμ ꡬνμ΄ νμνλ€κ³ ν¨ - λ°λΌμ PR ꡬνμμλ νλμ λ°μ΄ν°λ₯Ό array λ°©μμΌλ‘λ μ κ·Ό(
ritem_set_XXX()
)ν μ μκ³ ,
κΈ°μ‘΄ list λ°©μμΌλ‘λ μ κ·Ό(tokenize_XXX()
)ν μ μλλ‘ κ΅¬νν μν
@@ -31,7 +31,7 @@ static void do_mblck_pool_init(mblck_pool_t *pool, uint32_t blck_len) | |||
pool->tail = NULL; | |||
pool->head = NULL; | |||
pool->blck_len = blck_len; | |||
pool->body_len = blck_len - sizeof(void *); | |||
pool->body_len = blck_len - (sizeof(void *) + sizeof(uint32_t)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sizeof(void *)
μ sizeof(uint32_t)
λ κ°κ° μ΄λ€ κ°μ ν¬κΈ°μΈκ°μ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old
| <----- blck_len -----> |
| <- body_len -> |
--------------------------
| *next | data |
new
| <-------- blck_len --------> |
| <--- value_item ---> |
| <- body_len -> |
--------------------------
| *next | len | ptr |
value_item.len
κ³Όpool->body_len
μ κ²°κ΅μλ κ°μ κ°μ κ°κ² λλ€κ³ ν¨
π Related Issue
β¨οΈ What I did
1. memory block μμ value_item λ₯Ό μ¬μ©νλλ‘ λ³κ²½ν©λλ€.
2. Memory Block List μλ£ κ΅¬μ‘° λ΄μμ Headλ₯Ό μ μΈν Memory Blockμ Additional Listμ λ£μ΄λ‘λλ€.
π― To Do
Ubuntuμμ unit test μ€ν¨ λ°μ : μμΈ νμ μ€