Date: Wed, 11 Nov 1998 15:33:42 +0100 (CET) From: Reinier Bezuidenhout <Reinier.Bezuidenhout@KryptoKom.DE> To: dg@root.com Cc: tlambert@primenet.com, grog@lemis.com, Reinier.Bezuidenhout@KryptoKom.DE@Cirdan.KryptoKom.DE, freebsd-hackers@FreeBSD.ORG Subject: Re: Malloc in the kernel and double panic Message-ID: <199811111433.PAA25157@borg.kryptokom.de> In-Reply-To: <199811110901.BAA13927@root.com> from David Greenman at "Nov 11, 1998 1: 1:34 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Hi ... After being unable to allocate a dynamic continious chunk of memory in the kernel, I decided I would not try to do it dynamically and let it grow as I need more entries. I decided to malloc one big array whose elements are pointers to structures ... so I have the following type: T_KEY *T_P_KEY; With T_KEY the structure. T_P_KEY *large_one; large_one = (T_P_KEY *)malloc(sizeof(T_P_KEY) * 10000, M_DEVBUF, M_WAITOK); And this causes a happy double panic in the kernel.... How can I allocate a 10000 * sizeof(pointer) section of memory in the kernel ? I have tried this on different hardware platforms etc. and the same thing happens. Any ideas ??? Reinier > >> to allocate demand-zero, pageable, kernel memory. > > > >Hmmm.... > > > > > >Better fix /sys/kern/sysv_shm.c then, since that's where I cribbed the > >code from... > > sysv_shm.c is a special beast that specifically *avoids* allocating kernel > VM for the objects it manages. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811111433.PAA25157>