Dev: It’s all about memory

Started by JeGX, April 24, 2020, 01:58:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JeGX

A series of articles for C/C++ programmers about memory allocation, structs vs classes, alignment, packing, bit fields...

Quote
Building on top of what we have discussed so far in previous installments of this series (part 1: memory allocation, part 2: structs or classes?), this time is about what we can do with structs. While previous posts were aimed at novices, this post digs deeper to some techniques that some mid level developer may not know. The good in this is how these concepts are trivial to master and you don't need to have a whole lot of experience to learn what follows.

As usual, this post is about C++ with some hints at C. Actually this time I will touch on techniques that are typical in C, yet fully applicable to C++. This is knowledge that used to be fundamental, back in days when the amount of RAM in computers was measured Kilobytes. So if you are developing a typical application that runs on a modern computer, you probably don't need to apply these techniques, even though it wouldn't hurt! However if your are writing a complex graphics or simulation application that is supposed to load very large data sets, then you may benefit from what I have to present.

Links:
- https://maxliani.wordpress.com/2020/04/21/dev-its-all-about-memory-part-1/
- https://maxliani.wordpress.com/2020/04/22/dev-its-all-about-memory-part-2/
- https://maxliani.wordpress.com/2020/04/23/dev-its-all-about-memory-part-3/