Writing and Using Shared Libraries (Article)
This article shows you steps to build a shared libraries and how to incorporate
them into your machine. The article starts at explaining about how shared
library differs form static library. It is worth mentioning that shared library
is not dependent on the address because the functions inside the shared library
may be stored in different address. To mitigate that issue, try to use -fPIC
flag when compiling codes that will use the shared library.
How Static and Dynamic Libraries affect Memory Usage (Paper)
This master thesis talks about the difference between Static Libraries and
Dynamic Libraries, and how both affect memory usage in a machine. The test was
conducted on IP-STB embedded system, and was conducted to give quantitative
analysis of how each Library use the memory and how it impact system
performance. This is a very interesting read, I’d recommend you to read this.
Why microprocessors prefer Little Endian (Article)
There’s a reason why microprocessors use little endian while networking protocol
uses big endian. This article explains briefly the advantages of both formats
and why both have their own places. Endian issues are an example of general
encoding problem, basically.
How to manage memory with malloc, calloc, realloc, and free in C (Video)
This video explains about memory management with malloc
, calloc
, realloc
,
and free
. I love the way he explains with a sample code. You can try to run
the sample code if you want to try it yourself. After all, learning by doing is
always better imo. Go give it a try
What does the malloc do? (Video)
Malloc is one of the magic function of the C language. This video explains
thoroughly about how malloc works and how it finds new memory locations. The
video starts on explaining a few C functions, and then proceed to explain how
malloc utilize those lower function as if it’s doing some sort of sorcery.
Pointers in C(++) (Video)
The video explains a lot about pointers. In my opinion, the explanation is very
clear that I think I understand what pointers are. The video also poke around
double pointers and how they reference double pointers. This video uses C++ for
demonstration, but I think pointers on C++ and C are identical, and both
language uses the saame concept to implement pointers.
Get the most out of the linker map file
Mr. Ibam told us about how nasty map file is. But This article shows that map
files are quite useful to debug better. I think it is better to learn more about
it and see how it achieve it’s purpose directly. Experience is the best teacher,
am I right?
Why pointers powerful and dangerous at the same time (Article)
This article explains about pointers in C very thoroughly. I really really
really recommend this if you’re still stuck at learning pointers. This is the
most important, bookmark-worthy, article imo. The author explained pointers
very well.
Advanced C Pointer Exercise (Practice)
So you want to be a software engineer leet pointer coder? Go to this pointer
exercise. Pick a question. Read the prompt. Recommended fot those who really
wants to ace how pointers works. If DDP ever uses C, this would be the exam
question imo.
Secure Memory Allocation in C and C++
As you know from previous week. C are one of the most dangerous langauge. One of
the reason is pointers. Pointers can be a double-edged sword if you don’t use it
properly, and also be dangerous. This article covers how to mitigate the
dangerous part of pointers, I really find this article helpful.
This has been a very rough week. Also I think I touched pointers too much, though I think it is the most important part of C lang.