System Programming

[Intro to C] C as a systems programming language

써니(>_<) 2022. 7. 25. 03:43

C is a good choice for ...

  •Operating System developers

  •Embedded systems

  •People who reallycare about speed

  •Authors of security exploits

 

C has ... 

No objects, classes, features, methods, or interfaces

 - Only functions/procedures

 - We will see function pointers later…

No fancy built-in types

 - Mostly just what the hardware provides

 - Type constructors to build structured types

No exceptions 

- convention is to use integer return codes

No automatic memory management

 - Lots of things on the stack

 - No garbage collection

 - Heap structures explicitly created and freed

Pointers: direct access to memory addresses

 - Weakly typed by what they point to

 

=> C is about directly building and manipulating structures in mainmemory!

 

 

Summary

 

C is a systems programming language!

 - It is there to program the system.

 - Also useful for high performance

 

Understanding C is about understanding how

 - Your program

 - The C compiler

 - The present computer system

… all interact with each other.