From: Brian Haley <haley@zk3.dec.com>
Subject: Re: Kernel memory
Date: Mon, 13 Aug 2001 14:47:07 -0400 [thread overview]
Message-ID: <3B7820AA.8F09419C@zk3.dec.com> (raw)
In-Reply-To: 2f6bec0a.0108122121.14dc3350@posting.google.com
"Ginny E. Kim" wrote:
> > Well, you are using the M_NOWAIT flag, which tells malloc that if it
> > can't fulfill your request *immediately* then it must return NULL.
> > Can you change it to use M_WAITOK?
>
> Thank you for your advice.
> I figured out using M_WAITOK. what's difference of two within kernel?
> M_NOWAIT option has no problem.
> Can you explain their meaning more detaily, or recommend related documents?
I thought my last response clarified the difference...
M_NOWAIT == I cannot wait for memory
M_WAITOK == I can wait for memory
You shouldn't ever wait for memory in critical code paths or while
holding simple locks. I don't have time to search the documentation
for a more detailed explanation.
-Brian
-------------------------------------------------
Brian P. Haley
Tru64 UNIX Networking Group
prev parent reply other threads:[~2001-08-13 18:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-02 8:02 Kernel memory Ginny E. Kim
2001-08-02 13:01 ` Bob Harris
2001-08-03 4:55 ` Ginny E. Kim
2001-08-03 13:43 ` Brian Haley
2001-08-04 6:32 ` Ginny E. Kim
2001-08-10 15:48 ` Brian Haley
2001-08-13 5:21 ` Ginny E. Kim
2001-08-13 18:47 ` Brian Haley [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox