Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: static Clear Filter

C++: Zero-cost static initialization

Zero-cost statics in C++ "Усердие все превозмогает!" К. Прутков, Мысли и афоризмы, I, 84 In C and C++ a static variable can be defined in a function scope: int foo() { static int counter = 1; printf("foo() has been called %i times. ", counter++); ... } Technically, this defines counter as an object of static storage duration that is allocated not within the function activation frame (which is typically on the stack, but can be on the heap for a coroutine), but as a global object. This is o

Topics: foo int mov rbp static

C++: zero-cost static initialization

Zero-cost statics in C++ "Усердие все превозмогает!" К. Прутков, Мысли и афоризмы, I, 84 In C and C++ a static variable can be defined in a function scope: int foo() { static int counter = 1; printf("foo() has been called %i times. ", counter++); ... } Technically, this defines counter as an object of static storage duration that is allocated not within the function activation frame (which is typically on the stack, but can be on the heap for a coroutine), but as a global object. This is o

Topics: foo int mov rbp static

You Should Run a Certificate Transparency Log

Hear me out. If you are an organization with some spare storage and bandwidth, or an engineer looking to justify an overprovisioned homelab, you should consider running a Certificate Transparency log. It’s cheaper, easier, and more important than you might think. Certificate Transparency (CT) is one of the technologies that underpin the security of the whole web. It keeps Certificate Authorities honest, and allows website owners to be notified of unauthorized certificate issuance. It’s a big pa