🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Memory allocation in Borland C

#3770
From: David Dixon
Date: Tue, 13 Oct 1992 21:44
16 lines
1179 bytes
Please direct responses to DIXON@UCRPH0.UCR.EDU, as I do not subscribe to
this group.

Problem: I am trying to dynamically allocate a modest (32k) area of memory.
It seems to allocate OK, but corrupts the heap when I deallocate, hence
things go haywire when main() is exited.  I've tried every stinking
combination of memory model and pointer type I can think of.  The only
thing that seems to keep the machine happy is if I allocate very little
space.

Anybody have any suggestions?  I'm programming under Borland C, on a
386 with 4 M.  I've got QEMM386 running for memory management.  Using this
program shows lots and LOTS of free RAM, yet I'm getting all of this
erratic behavior.  Thanks.

					Dave
Technical Details
Message-ID: <1992Oct13.214405.1030@mnemosyne.cs.du.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!nyx!ddixon

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!mnemosyne.cs.du.edu!nyx!ddixon
From: ddixon@nyx.cs.du.edu (David Dixon)
Subject: Memory allocation in Borland C
Message-ID: <1992Oct13.214405.1030@mnemosyne.cs.du.edu>
Summary: INTEL 80x86 memory segmenting is sadistic 
Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Date: Tue, 13 Oct 92 21:44:05 GMT
Lines: 16