How to use realloc in C

preview_player
Показать описание
Source code can be found here:

===== Support us through our store =====

===== Check out our website =====

===== Check out our Discord server =====
Рекомендации по теме
Комментарии
Автор

Man I wish I had your videos 15 years ago

Bing.Chillin
Автор

The "trouble-shooting" discussions frame out the topic (realloc) excellently; addressing segfault and possible memory leaks in easily digestible examples and terminology as well as correctly implementing interfacing preventing and managing the problems was concise. As usual, awesome job.
Good vid.

NOPerative
Автор

That explains the pesci warning when not adjusting the pointer after reallocating memory. Thanks for taking the time to explain what's going on in background and I feel a lot more comfortable using realloc now.

bjornnordquist
Автор

Your videos about C are the best! I'm taking a software engineering course and you have helped me a lot! You should make videos about sockets, using select, poll, epoll e kqueue

churrosz
Автор

Looks really understandable, thanks so much for broad explanation!

huseynadze
Автор

I simply LOVE your videos about C - thank you

zyghom
Автор

Best Channel In Existence! I dont know why you dont have millions of views.
Love From Pakistan!

osamaanees
Автор

Great Video Sir,

please make videos on IPC in Linux. I know you have made some but it will be great if you can add message queues.
Also interrupt handling, bottom halves concept

chinmaygupta
Автор

Can you do more videos about I/O in C? Thank you ❤😊

hetaeramancer
Автор

Your videos are awesome and super easy to understand. Thank you. Do you think it could be possible for you to upload two big videos one for the whole Threads playlist and one for the Processes playlist?

miguelmendez
Автор

This is an awesome tutorial, want more of your C programming . I have a request on fike handling in C, so kindly accept it 😊

thiyagarajank
Автор

Excellent video (as we have come to expect). One point, if the the original allocation contained pointers to things within the allocation, say it contains a linked list, and arr is not NULL and doesn't equal res; the links will need to be adjusted by adding the difference between arr and res to each link. Aren't pointers wonderful?

willofirony
Автор

Thanks for making C videos.

Was is an idear to make a video or more videos about idiomatic C - please?

grimvian
Автор

Hi... what's the best C programming practice? Instead of "return 1", use "exit(1)" if realloc fails OR do "arr = res;"? I must confess that I never thought about create an exclusive pointer to manage the realloc operation. Thanks in advance.

fuscatube
Автор

I think beginner programmers have a tough time with malloc, realloc etc. since when we are learning we allocate statically.

noweare
Автор

Hello,

In your "learn pointers" pdf, I think there is a mistake:

Analyzing the line:
int p = &x;

Should be :
Analyzing the line:
int * p = &x;

KFlorent
Автор

Really you explain very good but I dont know english so good

mehdierdem
Автор

which keyboard are you using, and is it the same as couple of years ago?

bullet
Автор

Is that possible to get the geolocation through c program

prabhanjanakumartripathy
Автор

If the initial array had 10 element and in realloc we reduce it to 8.
Then does the last 2 elements gets memory leaked?

animeshkumarsinha