-
Notifications
You must be signed in to change notification settings - Fork 7
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
memory: user-space #13
base: Matvii.Zorin
Are you sure you want to change the base?
Conversation
Signed-off-by: Yevgen Kovalyov <[email protected]>
Signed-off-by: Yevgen Kovalyov <[email protected]>
Merge 2 new tasks
…free Signed-off-by: Zorin Matvii <[email protected]>
Measure time of functions malloc and free Get average of execution time Signed-off-by: Zorin Matvii <[email protected]>
See "Segmentation fault" in alloc_test() function Signed-off-by: Zorin Matvii <[email protected]>
Get standart stack size information via pthread attribute Count free allocation space using the appropriate coefficient (wontfix) Fix output of buffer size power (change the increment moment) Signed-off-by: Zorin Matvii <[email protected]>
Signed-off-by: Zorin Matvii <[email protected]>
memory/log.txt
Outdated
23 8388608 2389343 839 | ||
24 16777216 5158120 1421 | ||
25 33554432 26193 17083 | ||
26 67108864 10045 9273 |
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.
Can You explain why allocation of 2^25 bytes faster than allocation of 2^24 bytes?
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.
I think maybe in linux calloc function uses simple allocation and memset in cases, where we need lesser than the certain amount of bytes. So, in another cases it switches to the more efficient way for getting zero-initialized memory. For example - zeroed pages (2^24 bytes - 4096 pages, 1 page - 4096 bytes), but this method needs more time than I measured. I'd glad to receive Your opinion about this result
Merge solution for the first part of the Memory management task