5 ms·
Why not? I'd love to build web applications on a router with pure C.
by luikore 11y ago
Why not? I'd love to build web applications on a router with pure C.
- tomcam 11y agoMan, me too. I feel more comfortable knowing where all my memory is, and that my types are being checked at compile time.
- pjmlp 11y agoDo you really know where all you memory is being used without Valgrid?
- nitrogen 11y agoValgrind should definitely be a part of every C developer's workflow, if possible integrated into the unit and integration tests.
- pjmlp 11y agoIt doesn't help that is isn't available in all platforms, e.g. embedded, real-time OS, commercial UNIXes, mainframes.
- askfakasdsfsfk 11y agoTwo of those, embedded and real-time, Valgrind should help very little as you shouldn't be allocating anything anyway apart from statically.
- pjmlp 11y agoWell, there are still the other pointer misuses that are so common in C code.
- nitrogen 11y agoThat is unfortunate, but in those cases, if C or C++ is the only option, I would advocate writing cross-platform code and running the tests under a Valgrind-supported platform. This is a bit more difficult for kernel-level code running on an RTOS, as there might be a lot more unique APIs to stub out, but it can still be done.
- pjmlp 11y agoYou are no longer testing the same code under the real execution conditions, thus missing out possible leaks on the original code path. Although you can add that better test that than nothing, assuming that the respective OS vendor doesn't offer tooling similar to Valgrind, which I fully agree. EDIT: added some clarifications.
- ossreality 11y agoI'm sorry, but this comment is just hilarious