malloc and calloc in Linux

P

Pippo

I've a problem with linux redhat 9.0 and malloc or calloc.
Sometimes when I throw to allocate memory with calloc or malloc the program
stop (in the sense of infinite cycle) and the call to these function don't
return. How can I understand the reason? Why only sometime the malloc don't
return?(the are a lot of free memory in the pc)

Dario
 
A

Artie Gold

Pippo said:
I've a problem with linux redhat 9.0 and malloc or calloc.
Sometimes when I throw to allocate memory with calloc or malloc the program
stop (in the sense of infinite cycle) and the call to these function don't
return. How can I understand the reason? Why only sometime the malloc don't
return?(the are a lot of free memory in the pc)

The fact that you're running Linux not relevant here (and if it is
it's off topic anyway).

Please post the smallest possible compilable, runnable snippet of
code that exhibits this problem; otherwise, all we can suggest is
that you have a bug on the dreaded line 42 (or was it line
37...whatever).

HTH,
--ag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top