delorie.com/archives/browse.cgi | search |
From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: allocated memory size |
Date: | 22 May 2000 12:57:37 GMT |
Organization: | Aachen University of Technology (RWTH) |
Lines: | 15 |
Message-ID: | <8gbas1$c2b$1@nets3.rz.RWTH-Aachen.DE> |
References: | <Pine DOT LNX DOT 4 DOT 10 DOT 10005200546470 DOT 2249-100000 AT roadrunner DOT grendel DOT net> |
NNTP-Posting-Host: | acp3bf.physik.rwth-aachen.de |
X-Trace: | nets3.rz.RWTH-Aachen.DE 959000257 12363 137.226.32.75 (22 May 2000 12:57:37 GMT) |
X-Complaints-To: | abuse AT rwth-aachen DOT de |
NNTP-Posting-Date: | 22 May 2000 12:57:37 GMT |
Originator: | broeker@ |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Kalum Somaratna aka Grendel <kalum AT lintux DOT cx> wrote: [...] > Actually Why would you need to know how much of bytes has been allocated > to a pointer... In a nutshell: dynmically sized arrays. What a C++ programmer would implement using the 'vector<>' template can be implemented in C by a data structure containing a pointer to allocated memory, plus two variables: one to hold the current size of that array, and another that tells up to which place the array is currently filled. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |