From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Where can I get a Thread safe malloc debugger? Date: 04 Jul 2000 13:23:16 -0700 Organization: Posted via Supernews, http://www.supernews.com Lines: 28 Sender: nate AT mercury DOT bitbucket Message-ID: <83zonx1w7f.fsf@mercury.bitbucket> References: <200007041600 DOT TAA26298 AT alpha DOT netvision DOT net DOT il> X-Complaints-To: newsabuse AT supernews DOT com User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick writes: > On Tue, 04 Jul 2000 19:01:48 +0200, "Eli Zaretskii" > wrote: > > >> Date: Tue, 4 Jul 2000 21:17:57 +0600 (LKT) > >> From: Kalum Somaratna aka Grendel > >> > >> "It will probably port to any ANSI/POSIX system that provides mmap(), and > >> mprotect(), as long as mprotect() has the capability to turn off all > >> access to a memory page, and mmap() can use /dev/zero or the MAP_ANONYMOUS > >> flag to create virtual memory pages." > >> > >> What does this /dev/zero mean > > > >/dev/zero is a device reading from which yields zeroes. You can read > >as many zero bytes as you need for than device. > > And, unlike most character devices, /dev/zero can also be mmap()ed > like a file and is an alternate way of allocating memory. Yes. You can replace the mmap with valloc or something similar that allocates memory in pages (i.e. 4K multiples on a 4K boundary). -- Nate Eldredge neldredge AT hmc DOT edu