Skip to content
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

Question regarding mm_driver and error handling #22

Open
k296070 opened this issue Apr 20, 2024 · 4 comments
Open

Question regarding mm_driver and error handling #22

k296070 opened this issue Apr 20, 2024 · 4 comments
Labels
solved Question solved

Comments

@k296070
Copy link

k296070 commented Apr 20, 2024

Hello,
I have a question using mm_driver.
Q1.Does it check if the copying method works fine in the case of realloc?

Q2.For calling mm_free with an already freed block, I just used the function "fprintf" with the parameter stderr with the program still running. Is it fine?

Q3. Do I have to handle the errno set to ENOMEM? If errno ENOMEM is set in mm_malloc, I just returned NULL with the program running without handling the error, errmo.

Q4. If the header and footer are properly set, do the values inside the blocks matter? Except for realloc cases(because values of the previous block have to be maintained in realloc).

Thank you!

@col000
Copy link

col000 commented Apr 21, 2024

A1. In correctness mode, you can configure and evaluate the test sequence as needed.

A2. It's fine as long as it does not interfere with the progress of the program.

A3. If malloc fails to allocate, returning NULL is an approach you can freely implement.

A4. As you mentioned, as long as the header and footer are properly set, the internal values are not particularly important.

@k296070
Copy link
Author

k296070 commented Apr 21, 2024

For A1, Is setting correctness mode enough to evaluate sequences? If not, how could I configure to do so?

@col000
Copy link

col000 commented Apr 21, 2024

If the test sequence is sufficiently guaranteed, there should be no problem.
If you think that alone is not enough, it would be good to proceed in debug mode.
For detailed methods, it would be helpful to refer to $ ./mm_driver --help.

@k296070
Copy link
Author

k296070 commented Apr 21, 2024

Okay! Thank you

@kwonsw055 kwonsw055 added the solved Question solved label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved Question solved
Development

No branches or pull requests

3 participants