Date: 05 Dec 2000 16:32:29 +0100 From: Dag-Erling Smorgrav <des@ofug.org> To: "G. Adam Stanislav" <adam@whizkidtech.net> Cc: Stephen McKay <mckay@thehub.com.au>, hackers@FreeBSD.ORG Subject: Re: pipe Message-ID: <xzpwvdesx2q.fsf@flood.ping.uio.no> In-Reply-To: "G. Adam Stanislav"'s message of "Tue, 5 Dec 2000 08:56:45 -0600" References: <20001202085127.A301@int80h.org> <3A292D98.E655D755@softweyr.com> <20001203012841.B228@whizkidtech.net> <200012040256.eB42upH07905@dungeon.home> <20001205085645.A228@whizkidtech.net>
next in thread | previous in thread | raw e-mail | index | archive | help
"G. Adam Stanislav" <adam@whizkidtech.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpwvdesx2q.fsf>