From owner-freebsd-hackers Tue Dec 5 7:32:36 2000 From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 5 07:32:34 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id BF93F37B400 for ; Tue, 5 Dec 2000 07:32:33 -0800 (PST) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id QAA24845; Tue, 5 Dec 2000 16:32:30 +0100 (CET) (envelope-from des@ofug.org) Sender: des@ofug.org X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "G. Adam Stanislav" Cc: Stephen McKay , hackers@FreeBSD.ORG Subject: Re: pipe References: <20001202085127.A301@int80h.org> <3A292D98.E655D755@softweyr.com> <20001203012841.B228@whizkidtech.net> <200012040256.eB42upH07905@dungeon.home> <20001205085645.A228@whizkidtech.net> From: Dag-Erling Smorgrav Date: 05 Dec 2000 16:32:29 +0100 In-Reply-To: "G. Adam Stanislav"'s message of "Tue, 5 Dec 2000 08:56:45 -0600" Message-ID: Lines: 24 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "G. Adam Stanislav" writes: > > Use malloc() instead. > Unfortunately, that only works in C. :) Use mmap() or brk()/sbrk(). > I tried to figure out how to allocate memory, but, so far, was completely > unsuccessful. I studied the source for the C malloc, but did not understand > any of it. It uses something called mmap. I read the man page for mmap, > and was totally frustrated. It talks about mapping files into memory, > but I am not looking for files. Look for MAP_ANON in the mmap(2) man page. > It talks about passing an address to the > function. I don't get it... What address? I want it to allocate memory > for me and tell me its address. How am I supposed to know what address > is available??? Did you even read the man page? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message