🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3390

Re: C Memory Debugger Libraries (info wanted)

#3390
From: George Jetson
Date: Sun, 27 Sep 1992 02:13
35 lines
2152 bytes
In article <1992Sep26.234330.634@panix.com> bergman@panix.com (Mark Bergman) writes:

>Many people suggested the dbmalloc library recently posted to the net.
>Has anyone got this working under TurboC or DJGCC?
>

Speaking of DJGCC, I recently realized something very interesting:

	"You don't need malloc!"

All you have to do is declare a big array (make it 128 megabytes in size)
(e.g., for character strings, I just do a "char theData[128*1024*1024];")
and then let GO32 manage it for you.  You can declare as many of these
big arrays as you want, for each possible data type, and as long as the
the total amount of space that you actually use doesn't exceed 128M,
you're golden.  (Actualy, I take that back - you are limited to a gig of
static data (including bss and text) and a gig of stack, but you get the
idea...)

Basically, what you are doing is throwing the memory management task back to
the operating system, where it belongs.  IMHO, malloc() and its ilk are
all a big kludge, forcing the application to do what ought to be done by
the OS.

Of course, all of this only applies to new development and is not portable.

************************************************************************
A note to new readers:  the weasely :-) symbol is frowned upon in this
group.  Any questions, see Phil Gustafson who will gladly rearrange your
diodes for you.
			- From the AFU FAQ -

	- pynq@quads.uchicago.edu, who is still costing the net
	  hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
Technical Details
Message-ID: <1992Sep27.021335.15685@midway.uchicago.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!wupost!uwm.edu!linac!uchinews!quads!pynq
References: <1992Sep26.234330.634@panix.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer,comp.lang.c,alt.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!wupost!uwm.edu!linac!uchinews!quads!pynq
From: pynq@quads.uchicago.edu (George Jetson)
Subject: Re: C Memory Debugger Libraries (info wanted)
Message-ID: <1992Sep27.021335.15685@midway.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Reply-To: pynq@midway.uchicago.edu
Organization: D. J. Dougherty & Associates
References: <1992Sep26.234330.634@panix.com>
Date: Sun, 27 Sep 1992 02:13:35 GMT
Lines: 35