Memory, Pointers, string.h

CS 2130: Computer Systems and Organization 1

April 15, 2026

Announcements

Memory

Common Memory Problems (from reading)

  • Memory leak

  • Uninitialized memory

  • Accidental cast-to-pointer

  • Wrong use of ‘sizeof‘

  • Unary operator precedence mistakes

  • Use after free

  • Stack buffer overflow

  • Heap buffer overflow

  • Global buffer overflow

  • Use after return

  • Uninitialized pointer

  • Use after scope

More on man pages

char *strsep(char **s, const char *d);

char *strsep(char **s, const char *d);

string.h manual page and examples

strcmp(), mcp(), strcat()