From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,20b261795a1761e1 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-08-13 11:47:13 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!not-for-mail Message-ID: <3B7820AA.8F09419C@zk3.dec.com> From: Brian Haley X-Mailer: Mozilla 4.77 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: Kernel memory References: <2f6bec0a.0108020002.29080aa8@posting.google.com> <020820010901584492%harris@zk3.dec.com> <2f6bec0a.0108022055.24136296@posting.google.com> <3B6AAA99.4E07EB07@zk3.dec.com> <2f6bec0a.0108032232.74542b9d@posting.google.com> <3B74026A.827F3D4F@zk3.dec.com> <2f6bec0a.0108122121.14dc3350@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 13 Aug 2001 14:47:07 -0400 NNTP-Posting-Host: 16.140.64.151 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 997728427 16.140.64.151 (Mon, 13 Aug 2001 11:47:07 PDT) NNTP-Posting-Date: Mon, 13 Aug 2001 11:47:07 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:4174 "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