CST 334 - Operating Systems (Week 3)
This week, I met an 'old friend' that I had seen since my beginning in Computer Science career: Pointer. Back then, I was told this is the hard part of C and C++ programming languages. But when I get the hand of it, everything else won't be a big problem. Indeed, many materials such as linked list or tree are still a problem for me, just not a big one that makes me question myself.
Back to this week's materials, my mind is refresh and open with new knowledge. Previously, I only knew that Pointer stores the address of memory, and we can either access the address or the valuable it is pointing to. Diving deeper into Operating Systems, I learned that an uninitialized pointer variable can be pointed to anywhere. From nothingness such as ZERO or NULL to anything: garbage, or some crucial data. On top of that, the consequences are quite unpredictable. The pointer can give user some wrong but safety variables, or the program is crashed due to access violation, known as Segmentation Fault. However, the worst has yet to come, which is security concern and data violation. Those access data won't show any problem until it is too late, where they are overwriting or lost forever.Like a saying "Great power comes great responsibility." The pointer, the C and C++ languages are indeed powerful tools for programming. But if programmers don't handle them carefully enough, catastrophic can happen.
.png)
Comments
Post a Comment