It's UWAweek 9 (1st semester, week 1)


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 1168 articles.
Currently 2 other people reading this forum.

 UWA week 43 (2nd semester, study break) ↓
SVG not supported

Login to reply

6:56pm Wed 25th Oct, Christopher M.

> This might be a straightforward answer here but for dirent and stat structs, do you have to clear the structs at the end? We don't malloc or calloc it but I assume that it has memory, so I would assume that we have to free these structs at the end?
You are confusing terms. In this context, 'free'ing memory is the activity of deallocating memory previously allocated with malloc(). If you didn't malloc it (or realloc it, or strdup it...) then you don't free it. Freeing memory involves far more than clearing it.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy