SNU-ARC / 2024_spring_sysprog_Lab3

8 stars 0 forks source link

Question regarding mm_driver and error handling #22

Open k296070 opened 2 months ago

k296070 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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

col000 commented 2 months ago

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 commented 2 months ago

Okay! Thank you