Skip to content

[mem]MIN_SIZE宏定义 不易于理解 #8761

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

Closed
wdfk-prog opened this issue Apr 10, 2024 · 1 comment
Closed

[mem]MIN_SIZE宏定义 不易于理解 #8761

wdfk-prog opened this issue Apr 10, 2024 · 1 comment

Comments

@wdfk-prog
Copy link
Contributor

wdfk-prog commented Apr 10, 2024

https://club.rt-thread.org/ask/question/34fb69df13455861.html

  • 进行如下修改更易于理解
#define MIN_SIZE (sizeof(rt_ubase_t) + sizeof(rt_size_t) + sizeof(rt_size_t))
  • rt_ubase_t 在32位占4字节,在64位8字节
  • rt_size_t 在32位占4字节,在64位8字节

image

@wdfk-prog
Copy link
Contributor Author

64位我没有用过,不知道这么理解的对不对;不合理请指正

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant