Hacker News new | past | comments | ask | show | jobs | submit login

  {
    int8_t x = 1;
  }
allocates a byte on the stack, binds it to a variable named x, sets it to 1, then deallocates it from the stack. There is no explicit allocation or deallocation.

As an optimization it can be put into a register instead of the stack, again without explicit allocation and deallocation (this is done by the compiler playing musical chairs with registers).

I would not consider this manual. Manual would instead be something like in embedded programming

  int8_t* y = (int8_t*)0xB4DC0FF3;
  *y = 1;
because one needs to keep track of used memory locations (do allocation management)



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: