What Programmers Should Know About Memory Allocation - S. Al Bahra, H. Sowa, P. Khuong - CppCon 2019

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 4

  • @debajyotimajumder472
    @debajyotimajumder472 10 місяців тому +2

    Learnt something useful. 👍🏻

  • @Mallchad
    @Mallchad 3 місяці тому +1

    One very important thing he missed.
    He said that calloc is faster than malloc because it will not be allocated in memory until written, but is guranteed to be zero.
    Wait. You allocated memory but you have 0 bytes of physical memory? Oh. Great.
    It's disingenious to even talk about the "performance" of using memset + malloc that way- any performance you gain back using malloc is paid later when you page fault.
    Don't do it like that if you care about performance. Memset / MAP_POPULATE / mlock (or Win32 equivilent) if you want performance and get physical memory and DON'T keep calling malloc.

  • @srgsanky
    @srgsanky 6 місяців тому

    "My data or yours?: Orchestrating the movement and placement of data on large multicore systems" ua-cam.com/video/9YfnT3OhO-g/v-deo.html