11. Storage Allocation

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 10

  • @leixun
    @leixun 4 роки тому +21

    *My takeaways*
    1. Stack 1:14: allocation, deallocation
    2. Heap
    - Memory leak, dangling pointers, double freeing, memory checkers *(AddressSenitizer, Valgrind)* 5:36
    - Fix size allocation 11:07
    - Variable-size allocation 19:35
    - Storage layout of a program 27:10
    - Virtual memory can impact performance significantly 29:50
    - Analysis of binned free lists 31:48
    - Coalescing 34:05
    3. Garbage collection
    - Reference counting 35:46
    - Mark-and-Swap 44:22
    - Stop-and-Copy 50:15
    4. Summary 1:03:03

  • @MrSmeeds
    @MrSmeeds 2 роки тому +2

    Someone asked around 27:00 about whether the OS needs to use some storage allocation algorithm, and the lecturer replies "no, the OS just gives a large chunk of memory (via malloc)". I'm confused by this. Suppose program 1 and 2 are running. Program 1 requests memory, program 2 requests memory, then program 1 frees its memory.
    Doesn't this leave us with fragmentation in ram? To ask another way - When you request 4 gb of memory through malloc, are you guaranteed to receive a contiguous 4gb chunk, or could it come back as several smaller chunks somehow linked together? (Maybe I'm just not understanding how virtual memory works...)

  • @papachoudhary5482
    @papachoudhary5482 4 роки тому +1

    Thanks

  • @dengan699
    @dengan699 4 роки тому +1

    alloca is deprecated? what really?

  • @blackmage-89
    @blackmage-89 3 роки тому +1

    "seems there are a lot less people today"
    also a lot less *comments* i might say :)

  • @kewtomrao
    @kewtomrao 2 роки тому

    Wouldnt using DFS simplify the process by lot instead of BFS in Stop and Copy algo?

  • @cacheman
    @cacheman 4 роки тому +4

    Next video is ua-cam.com/video/d5e_YJGXXFU/v-deo.html

  • @gammingwithjaga1991
    @gammingwithjaga1991 5 років тому

    What is stack? Please explain

    • @404Dannyboy
      @404Dannyboy 4 роки тому

      Its a linear data structured ordered so that you can only deal with data at the most recent end of the structure.

    • @dxuhuang
      @dxuhuang 3 роки тому

      en.wikipedia.org/wiki/Stack_(abstract_data_type)