C_132 Introduction to Dynamic Memory Allocation in C | SMA vs DMA

preview_player
Показать описание
Use my code JKL10 to get 10% off on GATE subscription

Рекомендации по теме
Комментарии
Автор

Sma - complie time
Dma - run time
Dma - pointer required
Sma - doest require any pointer
Dma - memory can be freed
Sma - wastage of memory

bhaskarchakraborty
Автор

I am very glad you are back Jenny! Please whenever it is convenient for you, make videos about storage classes (auto, register, static, external storage classes) and command-line arguments, explaining the nuts and bolts of them as you do always. Thank you very much and again happy to see you back🙏

parisa
Автор

Key Differences:

Static memory allocation occurs at compile time and has a fixed size and lifetime, while dynamic memory allocation occurs at runtime, with variable size and potentially longer lifetimes.

Static memory allocation is often used for simple, fixed-size data structures and is managed automatically by the compiler. Dynamic memory allocation is used when data sizes are not known in advance and requires manual management.

Static allocation is typically faster and more deterministic, while dynamic allocation provides greater flexibility.

Dynamic allocation can lead to memory leaks or other runtime issues if memory is not deallocated properly. Static allocation avoids such issues.

The choice between static and dynamic memory allocation depends on the specific requirements of the program and the need for flexibility, performance, and memory management control.

asapnino
Автор

This is new??! Jenny your videos have saved me from linked list assignment! Love it and thank you! I dont even have any assignment atm but come for your video.

erwanfadlysudimanstudent
Автор

I was just eagerly waiting for this concept since 25 days mam tq for coming back and teaching this 🥰

saibalam
Автор

Notes for this session:
- In SMA, the compiler is pre-defined for how much memory is to be allocated to a certain variable & these memory allocated at run-time CANNOT be modified during runtime
- In DMA, The compiler allocates memory as per programmer needs and this memory can be changed during the runtime of code
- DMA is one of the application of Pointers
- Always remember to free the memory from the pointer once, you're done!
- Memory is dynamically allocated from the Heap

divyprakashpandey
Автор

Maam you are the only one in my life who helps me to reach my goals

c.ravikishorereddy
Автор

Hi mam i am not watching this video because I am there in your's string video but I will see this video after file concept thank you mam you are great🖖

cricketismyworld
Автор

Ma'am, you said after the execution the memory will be freed like that same block can be used in another program. But during execution, the memory is allocated for that particular variable so that memory is not available only during that program. so my question is whatever code we write that things don't take any space in memory once execution is done? (as you said they are freed in sma also)

Strawberry
Автор

Thank you mam your Teaching technique is very helpfull for knowledge or easily understandable and clearing proper concepts

mvbangar
Автор

Hello mam,
Can you please tell me that how many videos are left in this C programming course and how much time is it gonna take to be completed

VishalKumar-qljt
Автор

Mam, could you prepare a video on memory layout? It with be really helpful to us to visualise and get this memory allocation concept crystal clear...

occrguw
Автор

thank you Professor Jenny, you are always very helpful!

eumm
Автор

Much needed video. Thank you mam. I was waiting for video on this topic. ❤️

abhaymehta
Автор

I always come to get knowledge ❌
I always come here to see mam 😍✔️

adoptedkid
Автор

May you please discuss and explain more about the memory layout at 12:06 as you suggested? Thank you very much!

parisa
Автор

i have learn lots of new thinks here.. thank you so much mam...

uttamkumerroy
Автор

Mam ur lectures are really best for competitive exam...

tawseeffayaz
Автор

thank you mam this is the best matter for me for learning c programming

harshbachchani
Автор

Mam you are legend. I am in deep love with your teaching.

Quester