🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

heap in TC 2.0

#5696
From: Dan Schikore
Date: Wed, 10 Apr 1991 17:18
20 lines
1155 bytes
I seem to be confused about the use of the heap in Turbo C.  I understand that
coreleft() will not actually return the amount of unused space on the heap.
So how do I find out how much space is actually left?  I seem to remember
seeing somewhere how Turbo C finds the size block that you need, but now I
can't find it.  Can someone tell me:

1) Is the heap separated into paragraphs?  For example, will a malloc(2)
   actually mark off 16 bytes?

2) Can I find out how much space is allocated to a specific pointer? (Actual
   space on the heap)

3) Can I find out how much space is left unused in the entire heap?

If anything else I have said is wrong, I would appreciate any corrections.

Thanks,

-Dan Schikore
schikore@mentor.cc.purdue.edu
Technical Details
Message-ID: <10023@mentor.cc.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!schikore

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!schikore
From: schikore@mentor.cc.purdue.edu (Dan Schikore)
Newsgroups: comp.os.msdos.programmer
Subject: heap in TC 2.0
Message-ID: <10023@mentor.cc.purdue.edu>
Date: 10 Apr 91 17:18:02 GMT
Distribution: usa
Organization: Purdue University
Lines: 20