• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help with _MALLOC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with _MALLOC


  • Subject: Re: Help with _MALLOC
  • From: Peter Lovell <email@hidden>
  • Date: Wed, 29 Sep 2004 06:45:38 -0400


On Sep 27, 2004, at 12:55 PM, Matt Jaffa wrote:

No, but I should do that I am guessing right?
When is it smart to do M_NOWAIT?

Matt


On Sep 27, 2004, at 10:31 AM, stephane sudre wrote:


On Sep 27, 2004, at 6:28 PM, Matt Jaffa wrote:

Hi,

I have been core dumping my panics to a remote machine and been using gdb to figure out where in my
NKE it keeps crashing, and it appears to be randomly crashing at different parts.


maybe due to the fact I call _MALLOC and get space but it never allocated it. because I have a structure pointer that I allocate
and store things in there, but it is crashing at this line: one->thedata = data;


To me one must not be allocated so it crashes, how do I ensure that calling _MALLOC is going to give me space and not crash my NKE???

Are you using M_WAITOK?

M_NOWAIT is good if you don't want to block. You'll retry somehow on your own, or abandon the attempt, or ...


M_WAITOK means that you want to wait until the request can be fulfilled. That may take a while.

Cheers.....Peter

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Help with _MALLOC (From: Matt Jaffa <email@hidden>)
 >Re: Help with _MALLOC (From: stephane sudre <email@hidden>)
 >Re: Help with _MALLOC (From: Matt Jaffa <email@hidden>)

  • Prev by Date: Re: Help with _MALLOC
  • Previous by thread: Re: Help with _MALLOC
  • Next by thread: Re: Help with _MALLOC
  • Index(es):
    • Date
    • Thread