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-12 22:21:07 PST Path: archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail From: banny52@yahoo.com (Ginny E. Kim) Newsgroups: comp.unix.tru64 Subject: Re: Kernel memory Date: 12 Aug 2001 22:21:06 -0700 Organization: http://groups.google.com/ Message-ID: <2f6bec0a.0108122121.14dc3350@posting.google.com> 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> NNTP-Posting-Host: 211.117.39.57 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 997680066 11876 127.0.0.1 (13 Aug 2001 05:21:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Aug 2001 05:21:06 GMT Xref: archiver1.google.com comp.unix.tru64:4161 Brian Haley wrote in message news:<3B74026A.827F3D4F@zk3.dec.com>... > "Ginny E. Kim" wrote: > > > > > > > > X int table_init() > > > > > X { > > > > > X MALLOC(table, state_t **, sizeof(state_t *) * statesize, > > > > > X M_TEMP, M_NOWAIT); > > > > > X ...................... > > > > > X } > > > > I used MALLOC_VAR(), but, I got same result such as MALLOC().... > > Is there any other solution like increasing kernel memory? > > 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? > > -Brian > > ----------------------------------------------- > Brian P. Haley > Tru64 UNIX Networking Group 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?