Skip to content

Instantly share code, notes, and snippets.

@hello009-commits
Created May 19, 2013 07:53
Show Gist options
  • Save hello009-commits/5607004 to your computer and use it in GitHub Desktop.
Save hello009-commits/5607004 to your computer and use it in GitHub Desktop.
lean c

size_t

The C language provides the separate types size_t and ptrdiff_t to represent memory-related quantities. Existing types were deemed insufficient, because their size is defined according to the target processor's arithmetic capabilities, not the memory capabilities, such as available address space. Both of these types are defined in the stddef.h header (cstddef header in C++). size_t is used to represent the size of any object (including arrays) in the particular implementation. It is used as the return type of the sizeof operator. The maximum size of size_t is provided via SIZE_MAX, a macro constant which is defined in the stdint.h header (cstdint header in C++). It is guaranteed to be at least 65535. Note that size_t is unsigned, signed sizes can be represented by ssize_t.

getpid()

getpid, getppid -- get parent or calling process identification

Static variable

Scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment