delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/04/16:45:24

From: Nate Eldredge <neldredge AT hmc DOT edu>
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: <Pine DOT LNX DOT 4 DOT 21 DOT 0007042115050 DOT 1185-100000 AT roadrunner DOT grendel DOT net> <200007041600 DOT TAA26298 AT alpha DOT netvision DOT net DOT il> <o334ms4mnmcbatmb8vgbs0rnmdb6e4rd5i AT 4ax DOT com>
X-Complaints-To: newsabuse AT supernews DOT com
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> writes:

> On Tue, 04 Jul 2000 19:01:48 +0200, "Eli Zaretskii"
> <eliz AT is DOT elta DOT co DOT il> wrote:
> 
> >> Date: Tue, 4 Jul 2000 21:17:57 +0600 (LKT)
> >> From: Kalum Somaratna aka Grendel <kalum AT lintux DOT cx>
> >> 
> >> "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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019